PostNuke: A Flexible Open Source Content Management System
home | forum | international support | contact us

Support Forum

Start ::  Developers Corner ::  Module Development ::  templates including

Moderated by: Support Team

Bottom
templates including

  • Link to this postingPosted: 20.04.2008, 15:31
    Profile
    mdee24
    rank:
    pnSoftmore pnSoftmore
    registered:
     October 2007
    Status:
    online
    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.
  • Link to this postingPosted: 20.04.2008, 15:55
    Profile Homepage
    Guite
    rank:
    pnHelper 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.
    Code
    <!--[pnmodfunc modname="XX" type="user" func="left"]-->


    -----
  • Link to this postingPosted: 20.04.2008, 16:01
    Profile Homepage
    mumuri
    rank:
    pnSoftmore 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
  • Link to this postingPosted: 20.04.2008, 16:29
    Profile
    mdee24
    rank:
    pnSoftmore pnSoftmore
    registered:
     October 2007
    Status:
    online
    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
  • Link to this postingPosted: 20.04.2008, 16:36
    Profile Homepage
    mumuri
    rank:
    pnSoftmore 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 icon_smile
  • Link to this postingPosted: 20.04.2008, 16:37
    Profile
    mdee24
    rank:
    pnSoftmore pnSoftmore
    registered:
     October 2007
    Status:
    online
    Posts:
    53
    ok, I'll investigate icon_wink
  • Link to this postingPosted: 20.04.2008, 16:56
    Profile
    mdee24
    rank:
    pnSoftmore pnSoftmore
    registered:
     October 2007
    Status:
    online
    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:
    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.
  • Link to this postingPosted: 21.04.2008, 14:17
    Profile Homepage
    AmmoDump
    rank:
    pnProfessional 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.. icon_wink

    -----
    -- David Pahl -- (PostNuke Support Team)

    <div id="me" class="none" style="none" />

  • Link to this postingPosted: 22.04.2008, 12:33
    Profile Homepage
    Landseer
    rank:
    Steering Committee 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

Main Menu

Extensions Database

Documentation

Development

Login





 


 Log in Problems?
 New User? Sign Up!

Donate to PostNuke