Fork me on GitHub

templates including  Bottom

  • Hi guys,

    is there any way how to include template from one module to another? I mean, I have template called like XX_user_left.htm in XX module and would like to call(include) this template in another XY module. Is there any way how to do that or it's not possible because of security reasons?

    thanks for any help.
    -Martin.
  • Hi,

    edit the template of the XY module and add something like the following code to the place where you want to include your XX template.

    Code

    <!--[pnmodfunc modname="XX" type="user" func="left"]-->



    --
    Guite | ModuleStudio
  • http://noc.postnuke.com/tracker/index.php?func=detail&aid=8414&group_id=5&atid=103

    look here, get the output of pnUser.php function, then wrapp it in a block
  • great! thanks both of you guys.

    Unfortunately it's not working for me. Maybe I should be more concretely, so - I have template "pnmessages_user_newpm.htm" in pnMessages module and would like to include here my template from Profile module called "profile_user_left.htm".
    Are there some other criteria when I want to include template from SYSTEM module (default Profile module of PN is in system folder)?




    edited by: mdee24, Apr 20, 2008 - 04:33 PM
  • i ve not details but i think you should look how it's done in pnForum :)
  • ok, I'll investigate icon_wink
  • Hmmm, now I think I need to set something somewhere in Profile module, because when I trying to include "profile_user_view.htm" (one of defaults) template like:

    Code

    <!--[ pnmodfunc modname="Profile" type="user" func="view"]-->

    then it's working, but when trying to include template created by myself then it's not.
  • Why don't you give us a bigger clip of your code, so we can see what you are trying to do.. icon_wink

    --
    David Pahl
    Zikula Support Team
  • Including a template from module B in module A is not possible unless you copy the file you need to template A's pntemplates folder.

    Using the pnmodfunc is a valid solution as it also fill the template with data.



    --
    "He is not dangerous, he just wants to play...."
  • 0 users

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