How to include a template from a different directory

Hi,
I have a page navigation menu that I placed in a template file.  All the browsing files would then call this template file using cfinclude. 
I now want to call this file from a different directory.  However, this causes all the url and image links to be wrong because the template file uses relative path off of root directory.
I have looked at using cfmodule, but it seems that I would have the same issues unless I make the paths absolute, which I am trying to avoid.
I also thought of prepending to every link in the template file with a directory prefix variable which I passes from the calling files.
Is there an easy and better way to solve this?
Thanks!
Min

To dynamically get the absolute path from a relative path take a look at expandPath()
http://livedocs.adobe.com/coldfusion/8/htmldocs/functions_e-g_05.html

Similar Messages

  • How can i import tables from a different schema into the existing relational model... to add these tables in the existing model? plss help

    how can i import tables from a different schema into the existing relational model... to add these tables in the existing relational/logical model? plss help
    note; I already have the relational/logical model ready from one schema... and I need to add few more tables to this relational/logical model
    can I import the same way as I did previously??
    but even if I do the same how can I add it in the model?? as the logical model has already been engineered..
    please help ...
    thanks

    Hi,
    Before you start, you should probably take a backup copy of your design (the .dmd file and associated folder), in case the update does not work out as you had hoped.
    You need to use Import > Data Dictionary again, to start the Data Dictionary Import Wizard.
    In step 1 use a suitable database connection that can access the relevant table definitions.
    In step 2 select the schema (or schemas) to import.  The "Import to" field in the lower left part of the main panel allows you to select which existing Relational Model to import into (or to specify that a new Relational Model is to be created).
    In step 3 select the tables to import.  (Note that if there are an Foreign Key constraints between the new tables and any tables you had previously imported, you should also include the previous tables, otherwise the Foreign Key constraints will not be imported.)
    After the import itself has completed, the "Compare Models" dialog is displayed.  This shows the differences between the model being imported and the previous state of the model, and allows you to select which changes are to be applied.
    Just selecting the Merge button should apply all the additions and changes in the new import.
    Having updated your Relational Model, you can then update your Logical Model.  To do this you repeat the "Engineer to Logical Model".  This displays the "Engineer to Logical Model" dialog, which shows the changes which will be applied to the Logical Model, and allows you to select which changes are to be applied.
    Just selecting the Engineer button should apply all the additions and changes.
    I hope this helps you achieve what you want.
    David

  • How can I transfer songs from two different itunes?

    I want to transfer songs from my brother's itunes library to my shuffle, but when I plug it in his computer, a message saying that his library is not linked to my library (or something to that extent) and whether I would like to replace the songs. If I click yes, all my existing songs are replaced with HIS songs. If I click on NO, the Shuffle icon does not appear at all and I cannot transfer any of his songs to my shuffle. How can I transfer songs from two different computers into my shuffle without replacing any of my existing music?
    Shuffle   Windows XP  
      Windows XP  

    You'll have to setup your iPod to manual instead of automatic update (I'm not sure, though, if it works with the Shuffle as well).
    Alexander.

  • HT4061 How do I consolidate purchases from two different ids that are on the same bank account, and eliminate the extra id without losing any purchases?

    How do I consolidate purchases from two different ids that are on the same bank account, and eliminate the extra id without losing any purchases? I want my music to match on both ipad and computer.

    Purchases are forever tied to the AppleID they were bought with. There is currently no way to consolidate AppleIDs. Sorry.

  • HT204053 My ipad stores my documents on iCloud. How can I find them from a different computer, as I used to do by using a memory stick on my old PC etc ?

    My ipad stores my documents in iCloud. How can I find them from a different computer?  I used to use a memory stick and could work on my documents on any computer and want to have a replacement system using documents created on my ipad - I can't use a memory stick with it.

    How do you know that they are on iCloud, the iPad can (and does) save locally. If they are on iCloud they will be accessible via the application that created them (Pages, Numbers etc) and can be reached from any computer with iCloud access by logging to iCloud.com. But you did that and stated that they are not there, so what makes you think that they are?

  • HT204074 How do I download apps from a different one of my apple id's?

    How do I download apps from a different one of my apple id's? Would I change apple ID's on IPad that I want download app on? Do you lose music, apps when you switch from one apple ID to another?

    Sign out of the store, and sign back in with the other ID.  Nothing gets lost.

  • How do I calculate days from two different dates?

    Hi all,
    How do I calculate days from two different dates?
    my requirement is to pass the number of days to target field from two dates.
    Current date :  14/04/2010
    Standard date: 01/01/1957 is the standard = day 0
    Is it possible in graphical mapping with out  udf?
    Plz help me on this I have donu2019t have much knowledge on JAVA.
    Thanks

    Hi Yadav,
    Probably this is not the correct forum for XI / PI .
    You can post the same to...
    Process Integration (PI) & SOA Middleware
    Hope this helps.
    Regards
    Raj

  • How do I calculate days from two different dates in XI/PI?

    Hi all,
    How do I calculate days from two different dates in XI/PI?
    my requirement is to pass the number of days to target field from two dates.
    Current date : 14/04/2010
    Standard date: 01/01/1957 is the standard = day 0
    Is it possible in graphical mapping with out udf?
    Plz help me on this I have donu2019t have much knowledge on JAVA.
    Thanks

    Hi Yadav,
    Probably this is not the correct forum for XI / PI .
    You can post the same to...
    Process Integration (PI) & SOA Middleware
    Hope this helps.
    Regards
    Raj

  • How can I use music from two different iTunes accounts?

    how can I use music from two different iTunes accounts?

    If you mean iTunes Store accounts, there's really nothing for you to do. Just add the tracks to the iTunes library and play them. Music purchased prior to late-2009 will been to be authorized, though. Pull down Store > Authorize... and type the credentials of the Apple ID used to buy the tracks.
    If you mean something else, please describe in more detail.

  • How to call a package from a different instance?

    Dear all:
    how to call a package from a different instance?
    for example:
    package A belongs to instance A1
    package B belongs to instance B1
    Now I want to call the package B in instance A1, how can I do ? my environment is oracle 10g
    Regards
    Terry

    Terry Chen wrote:
    Dear all:
    how to call a package from a different instance?
    for example:
    package A belongs to instance A1
    package B belongs to instance B1
    Now I want to call the package B in instance A1, how can I do ? my environment is oracle 10g
    First you have to create create dblink in A1 database as below
    CREATE DATABASE LINK INSA1
       CONNECT TO USER_NAME IDENTIFIED BY <pass>
       USING 'B!' Then you can execute exec pack_b@INSA1;

  • How can I delete templates from MY TEMPLATES in Pages?

    How can I delete templates from MY TEMPLATES i Pages?

    Pages stores those you created & saved as templates in (your account) > Library > Application Support > iWork > Pages > Templates > My Templates. The user's Library is hidden in Lion & Mountain Lion but it is easy to open. In Finder, hold down the Option key while clicking on the Go menu & your user Library will appear about halfway down the list. Or you can choose Go to Folder from Go menu in Finder & paste this line in the box:
    ~/Library/Application Support/iWork/Numbers/Templates/My Templates/

  • How to include header files from different directories?

    Hi,
    Sorry for the newb question, but I can't figure this out. I'm trying to compile a simple piece of code (C++) that uses header files in a directory different from the Project directory; header files are in /opt/csw/postgresql/include/pqxx. I've tried a few different things, adding that directory to the include directives under Resource Files, add existing files from a folder, etc etc. Whenever I try to build, dmake bails with status -1. I can't seem to get this working, can someone explain how to use header files from different directories?
    Thanks,
    SlowToady

    Header files are usually specified relative to a base directory. If the base directory is not a system directory -- /usr/include or the compiler installation directory -- add a command-line directive
    -I path/to/base/dirfor each such directory.
    The path can be absolute, such as
    -i /opt/csw/postgresql/includeor relative, such as
    -I ../../my/includeIn your source code, specify the header file relative to the base directory, and be sure to use quotes, not angle brackets. Example:
    #include "header.h"  // right
    #include <header.h>  // wrongThe angle brackets are used for system headers, like <iostream> or <stdlib.h>.
    The rules above are common to all compilers on Unix and Linux, and generally to all C and C++ compilers.
    For more details, read about the -I option in the C++ Users Guide. You can find the guide by pointing your browser to the "docs" directory in the compiler installation, or go here:
    http://docs.sun.com/app/docs/doc/819-5267
    All command-line options are described in Appendix A.

  • How do I install software from a different carrier?

    Hi, im using a curve 8900 and with Rogers... I went on the software site under rogers for the bb and the latest version is v4.6.1.378, however I see some american carriers have it at v5.0*... My question is, if I download software from a different carrier, will it work and how would I go about doing it?
    Thanks...

    Hi and Welcome to the Forums!
    By following this procedure:
    http://supportforums.blackberry.com/t5/BlackBerry-Device-Software/How-To-Reload-Your-Operating-Syste...
    But modifying it with one change...insert, between steps 1 and 2, the deletion, on your PC, of a file named VENDOR.XML.
    Good luck!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • How to download a template from BDN to a program?

    Hi,
    There is an excel sheet in BDN(t-code-oaor). I need to call this template in a report.
    After that I will fill data in this excel and download it on the local PC.
    I need suggestions that how can I do it?

    This is  sample prog for downloading the template from BDN to local system.
    REPORT  YVAI_SV_LOC.
    type-pools : slis.
    Tables containing the Fields for appl. toolbar on selection screens.
    tables : sscrfields.
    Business Document Navigator: Internal Connection Table for the
    download of excel template.
    data:  begin of i_bds_conn occurs 10.
            include structure bdn_con.
    data:   objecttext  like toasp-objecttext,
            objecttext2 like toasd-objecttext,
            objecttext3 like toasr-objecttext,
            ntext       like tojtt-ntext,
         end of i_bds_conn.
    *data : i_local_path_for_copy like rlgrap-filename.
    **i_local_path_for_copy = 'E:\'.
    data: gv_flag    type xflag,
          gv_item_no type i.
    data: gs_bds_conn_marked like i_bds_conn occurs 5 with header line.
    data: l_ipi(40) type c.
    selection-screen function key 1.
    selection-screen begin of block c1 with frame title text-001.
    parameters : p_po type rlgrap-filename
                        obligatory default 'E:\test98.xls'.
    selection-screen end of block c1.
    Intialization for the text for function key.
    Create application toolbar with following mentioned text
    initialization.
      move text-tit to sscrfields-functxt_01.
    At selection screen on value request the file seach is performed.
    File search opens standard window pop-up for searching the file.
    *AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_po.
    PERFORM file_search.
    at selection-screen.
      if sscrfields-ucomm = 'FC01'.
    The Excel Id and other information is to be passed to the program
    SAPLBDS_TOOLS to get the excel template.
        perform fill_bds_data.
       perform export_document
         in program saplbds_tools
             using gs_bds_conn_marked.
        perform y_export_document
              using gs_bds_conn_marked.
      if sy-subrc = 0.
        call TRANSACTION 'YVAI_TEST98'.
      endif.
    call TRANSACTION 'YVAI1'.
      elseif sscrfields-ucomm = 'ONLI'.
    The Check for the file Existence for uploading.
        call function 'DX_FILE_EXISTENCE_CHECK'
          exporting
            filename       = p_po
            pc             = 'X'
          importing
            file_exists    = gv_flag
          exceptions
            rfc_error      = 1
            frontend_error = 2
            no_authority   = 3
            others         = 4.
        if sy-subrc <> 0.
          message id sy-msgid type sy-msgty number sy-msgno
                  with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        endif.
        if gv_flag = ' '.
          message e070(zf) with p_po.
        endif.
      endif.
    *&      Form  fill_bds_data
          Passing the Required parameters for the excel.
    form fill_bds_data .
      gs_bds_conn_marked-client = sy-mandt.
      gs_bds_conn_marked-classname = 'SOFFICEINTEGRATION'.
      gs_bds_conn_marked-classtype = 'OT'.
      gs_bds_conn_marked-objkey = 'SOFFICEINTEGRATION'.
      gs_bds_conn_marked-loio_id =
                                'BDS_LOC2  DDBD0807B93B26F19ED30050569F4158'.
      gs_bds_conn_marked-doc_ver_no = '1'.
      gs_bds_conn_marked-doc_var_id = '1'.
      gs_bds_conn_marked-doc_var_tg = 'OR'.
      gs_bds_conn_marked-descript = 'VCPI'.
      gs_bds_conn_marked-langu = 'E'.
      gs_bds_conn_marked-comp_id = 'vai - test99 file.xls'.
      gs_bds_conn_marked-mimetype = 'application/vnd.ms-excel'.
      gs_bds_conn_marked-contrep = 'BDS_DB2_R'.
      gs_bds_conn_marked-docuclass = 'XLS'.
      gs_bds_conn_marked-doc_type = 'BDS_SHEET'.
      gs_bds_conn_marked-stor_tab = '2'.
    endform.
                        " fill_bds_data
    form y_export_document using i_bds_conn_marked structure i_bds_conn.
    -- data declaration                                               -- *
      data: local_signature like bapisignat occurs 1 with header line,
            export_components like bapicompon occurs 5 with header line,
            i_local_path_for_copy like rlgrap-filename,
            popup_fields like sval occurs 5 with header line.
      DATA : i_files like bapifiles occurs 1 with header line.
      clear:   i_files.
      refresh: i_files.
    -- check if document is currently in change modus                 -- *
    if ( ( i_bds_conn_chng-loio_id    = i_bds_conn_marked-loio_id and
         i_bds_conn_chng-doc_ver_no = i_bds_conn_marked-doc_ver_no and
         i_bds_conn_chng-doc_var_id = i_bds_conn_marked-doc_var_id and
           i_bds_conn_chng-doc_var_tg = i_bds_conn_marked-doc_var_tg )
            and (  i_bds_conn_chng-loio_id <> space and
                   i_bds_conn_marked-loio_id <> space  )
            and ( doc_chng_is_open = 'X' ) ).
         -> set info popup -> doc can not be exported
       message i337(sbds).
    endif.
    -- check if components exist                                      -- *
    -- fill signature table
      local_signature-doc_count  = '1'.
      local_signature-doc_id     = i_bds_conn_marked-loio_id.
      local_signature-doc_ver_no = i_bds_conn_marked-doc_ver_no.
      local_signature-doc_var_id = i_bds_conn_marked-doc_var_id.
      local_signature-doc_var_tg = i_bds_conn_marked-doc_var_tg.
      append local_signature.
      call function 'BDS_BUSINESSDOCUMENT_GET_INFO'
        exporting
          logical_system  = i_bds_conn_marked-log_system
          classname       = i_bds_conn_marked-classname
          classtype       = i_bds_conn_marked-classtype
          client          = i_bds_conn_marked-client
          object_key      = i_bds_conn_marked-objkey
          all             = 'X'
        tables
          components      = export_components
          signature       = local_signature
        exceptions
          nothing_found   = 1
          parameter_error = 2
          not_allowed     = 3
          error_kpro      = 4
          internal_error  = 5
          not_authorized  = 6
          others          = 7.
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
        with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    -- get path for export                                            -- *
      call function 'WS_QUERY'
        exporting
          query          = 'CD'
        importing
          return         = i_local_path_for_copy
        exceptions
          inv_query      = 1
          no_batch       = 2
          frontend_error = 3
          others         = 4.
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
        with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    -- get path for the documents by the user                         -- *
    perform get_local_path using i_local_path_for_copy.
      loop at export_components.
        i_files-doc_count  = export_components-doc_count.
        i_files-comp_count = export_components-comp_count.
        i_files-comp_id    = export_components-comp_id.
       i_files-directory  = i_local_path_for_copy.
         i_files-directory  = p_po.
        append i_files.
      endloop.
      call function 'BDS_BUSINESSDOCUMENT_GET_FILES'
        exporting
          logical_system  = i_bds_conn_marked-log_system
          classname       = i_bds_conn_marked-classname
          classtype       = i_bds_conn_marked-classtype
          client          = i_bds_conn_marked-client
          object_key      = i_bds_conn_marked-objkey
        tables
          files           = i_files
          signature       = local_signature
        exceptions
          nothing_found   = 1
          parameter_error = 2
          not_allowed     = 3
          error_kpro      = 4
          internal_error  = 5
          not_authorized  = 6
          others          = 7.
      if sy-subrc <> 0.
       message i338(sbds).
      else.
       message i339(sbds).
      endif.
    endform.                               " EXPORT_DOCUMENT

  • How to change a TEMPLATE to a different one?

    I know I can change templates from the list given... but the question is, How to change the "Welcome" template to the template "About Me" vise versa or any other page available rather than the same one? Thanks!
    www.RoxyTheBulldog.com

    Thanks to everyone who attempted to help... I know there was no easy answer to this.

Maybe you are looking for

  • Install j2se plugin version 1.6.0_07 on your client and NPX_PLUGIN_PATH environment variable set before starting Netscape.

    Hi experts m new to apps please help.. I have installed successfully Oracle Apps R12 on OEL - 5 All the services runining fine. but when i am opening forms its giving error "install missing plugins" i installed jre-6u7-linux-i586-rpm.bin and Mozilla

  • How to place the regions in required positions

    Hi I have a requirement like below to place the regions Region_Seq_10 Region_Seq_20 Region_Seq_30 Region_Seq_40 Region_Seq_50 Region_Seq_60 How Can I design exactly above mentione way of positioning the regions. Regards Kiran Akkiraju

  • Problem in scheduler - Oracle 10G

    I have 2 databases connected through a connected user link. Example: 1) TEST schema in db1 and TEST schema in db2 connected through DB link LINK1 which is through connected user (Username and password not provided while creating DB link since they ha

  • Macbook Internet works only on the stairs

    Im new to this and this is a bit of a story so please bear with me.. Macbook 10.4.11 owned by my brother was re-called for battery issues about 4 years ago, when the macbook was returned, wifi would only be received in close proximity to the router.

  • Site-wide media query file

    Let's say one has a style sheet for detail pages on one's website, say "detail.css", designed for desktop monitors.   Now one creates a sitewide media query file, e.g., mq-detail.css which looks like this to refer to the tablet and phone style sheets