Fork me on GitHub

relative path  Bottom

  • I try to include a file with no success in a theme template.
    If the file is in the same directory

    Code

    <!--[include file='links.tpl']-->

    no problems, but If I include

    Code

    <!--[ include file='/chroot/home/pantakin/public_html/themes/andreas08/templates/modules/links.tpl' ]-->

    it doesn't work

  • rename links.tpl to links.htm and then

    Code

    <!--[include file="/chroot/home/pantakin/public_html/themes/andreas08/templates/modules/links.htm"]-->


    Not tested yet by myself on a 0.8.x release...

    - Igor
  • thanks, I tried but it doesn't work...
  • then I assume your path is not correct.
    The path is not always what you see in your ftp-editor

    FTP : /domains/YOURDOMAIN.XXX/public_html/
    path: /home/MYUSERNAME/domains/YOURDOMAIN.XXX/public_html/

    - Igor
  • Strike my latest comment...
    Something is indeed off here [tested it myself now].

    - Igor
  • Template files are relative to:

    PNROOT/themes/YOURTHEME/templates/

    so..

    ../../../modules/links.tpl

















    edited by: AmmoDump, Dec 31, 2007 - 11:52 AM

    --
    David Pahl
    Zikula Support Team
  • nothing, I tried every path. The file is not included and no error messages...
    In my master.htm I had to set

    Code

    <!--[include file='links.tpl']-->

    It's working but I don't know the reason. That file is not in the same directory but inside the "modules" directory
  • If a file isn't in the current directory, please use file::


    Code

    <!--[include file="file:../filename.htm" ]-->


    Another example:

    Code

    <!--[include file="file:../filename.htm" newuid=$param.uid newuname=$param.uname]-->




    I am using this inside a lot of module-specific templates
    \themes\[themename]\templates\modules\modname\templatename.htm


    And filename.htm is located in \themes\[themename]\templates\modules\filename.htm





    edited by: Herr.Vorragend, Dec 31, 2007 - 10:24 PM
  • MySelf

    Template files are relative to:

    PNROOT/themes/YOURTHEME/templates/


    Look at my theme pnWinter available in themes area:
    http://community.postnuke.com/module-Database-viewpub-tid-4-pid-80.htm It uses this kind of template management. Also we had a discussion about this here: http://community.postnuke.com/module-Forum-viewtopic-topic-52735.htm


    --
    David Pahl
    Zikula Support Team
  • thanks, now my "includes" are working and thanks for pointing me to that interesting discussion topic

This list is based on users active over the last 60 minutes.