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.
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- mazdev responded to »Hide "Register new account" and change template to 3 col« 07:50 AM
- mesteele101 created topic »Zikula 1.3.3 - Site Search 1.5.2 - Unable to turn off plug-ins« 07:48 AM
- internetking created topic »password problem« 25. May
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 25. May
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 25. May
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 25. May
- mdee created topic »How to implement returnpage ?« 25. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
templates including
-
- Rank: Freshman
- Registered: Oct 30, 2007
- Last visit: Jan 13, 2009
- Posts: 69
-
- Rank: Team Member
- Registered: Jan 19, 2003
- Last visit: Apr 06, 2010
- Posts: 442
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 -
- Rank: Developer
- Registered: May 17, 2004
- Last visit: Apr 08, 2010
- Posts: 386
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 -
- Rank: Freshman
- Registered: Oct 30, 2007
- Last visit: Jan 13, 2009
- Posts: 69
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: Developer
- Registered: May 17, 2004
- Last visit: Apr 08, 2010
- Posts: 386
i ve not details but i think you should look how it's done in pnForum :) -
- Rank: Freshman
- Registered: Oct 30, 2007
- Last visit: Jan 13, 2009
- Posts: 69
-
- Rank: Freshman
- Registered: Oct 30, 2007
- Last visit: Jan 13, 2009
- Posts: 69
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. -
- Rank: Team Member
- Registered: Dec 07, 2003
- Last visit: May 09, 2010
- Posts: 2703
Why don't you give us a bigger clip of your code, so we can see what you are trying to do..
--
David Pahl
Zikula Support Team -
- Rank: Team Member
- Registered: Jan 02, 2003
- Last visit: Oct 21, 2009
- Posts: 800
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...."
- Moderated by:
- Support
Users on-line
- 0 users
This list is based on users active over the last 60 minutes.
