Start ::
Developers Corner ::
Module Development ::
templates including
Moderated by: Support Team
-
- rank:
-
pnSoftmore
- registered:
- October 2007
- Status:
- offline
- last visit:
- 26.04.08
- Posts:
- 53
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. -
- rank:
-
pnHelper
- registered:
- January 2003
- Status:
- offline
- last visit:
- 20.04.08
- Posts:
- 140
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.
-----
-
- rank:
-
pnSoftmore
- registered:
- May 2004
- Status:
- offline
- last visit:
- 04.05.08
- Posts:
- 53
http://noc.postnuke.com/t...14&group_id=5&atid=103
look here, get the output of pnUser.php function, then wrapp it in a block
-----
Top Flood - a discussions board based on pnForum -
- rank:
-
pnSoftmore
- registered:
- October 2007
- Status:
- offline
- last visit:
- 26.04.08
- Posts:
- 53
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 -
- rank:
-
pnSoftmore
- registered:
- May 2004
- Status:
- offline
- last visit:
- 04.05.08
- Posts:
- 53
i ve not details but i think you should look how it's done in pnForum
-
- rank:
-
pnSoftmore
- registered:
- October 2007
- Status:
- offline
- last visit:
- 26.04.08
- Posts:
- 53
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:
then it's working, but when trying to include template created by myself then it's not. -
- rank:
-
pnProfessional
- registered:
- December 2003
- Status:
- offline
- last visit:
- 08.05.08
- Posts:
- 2635
Why don't you give us a bigger clip of your code, so we can see what you are trying to do..
-----
-- David Pahl -- (PostNuke Support Team)
<div id="me" class="none" style="none" />
-
- rank:
-
Steering Committee
- registered:
- January 2003
- Status:
- offline
- last visit:
- 25.04.08
- Posts:
- 802
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...."
Start ::
Developers Corner ::
Module Development ::
templates including
