Fork me on GitHub

pnProfile Trying to Template Problem  Bottom

  • I'm trying to template pnProfile and I can't get any of the fields to show up.
    Just for example, one of my fields is _quote . In the main file instructions state

    I'm a little unclear on exactly how I need to call these functions, and have been toying with it all afternoon!! The code that calls all the variables up is

    Code

    <!--[foreach item="item" from=$profile]-->
            <!--[if $item.shown eq 1]-->
                <!--[if $item.value ne ""]-->
                <!--[if $item.public_status eq 0]--> <!--[* THIS IS DISPLAYED if ITEM SHOULD BE VISIBLE for EVERY USER *]-->
                <tr><td><!--[$item.description]--></td><td><!--[if $item.fieldtype eq "TEXTBOX"]--><fieldset><legend><!--[$item.description]--></legend><!--[/if]--><!--[$item.value|pnmodcallhooks|nl2br]--><!--[if $item.fieldtype eq "TEXTBOX"]--></fieldset><!--[/if]--></td></tr>
                <!--[/if]-->
            <!--[if $item.public_status eq 1]--> <!--[* THIS ITEM SHOULD ONLY BE SHOWN TO REGISTERED USERS *]-->
                <tr><td><!--[$item.description]--></td><td>
                <!--[if $viewer_uid gt 0]-->
                <!--[if $item.fieldtype eq "TEXTBOX"]--><fieldset><legend><!--[$item.description]--></legend><!--[/if]--><!--[$item.value|pnmodcallhooks|nl2br]--><!--[if $item.fieldtype eq "TEXTBOX"]--></fieldset><!--[/if]-->
                <!--[else]-->
                <!--[pnml name="_PNPROFILEONLYREGISTEREDUSERSCANSEETHIS"]-->
                <!--[/if]-->
                </td></tr>
            <!--[/if]-->
            <!--[if $item.public_status eq 2]--> <!--[* TO SEE THIS ITEM THE USER NIEEDS ADMIN PERMISSIONS for pnProfile *]-->
                <!--[pnsecauthaction realm="0" comp="pnProfile::" inst=".*" level="ACCESS_ADMIN" assign="auth"]-->
                <!--[if $auth]-->
                <tr><td><!--[$item.description]--></td><td><!--[if $item.fieldtype eq "TEXTBOX"]--><fieldset><legend><!--[$item.description]--></legend><!--[/if]--><!--[$item.value|pnmodcallhooks|nl2br]--><!--[if $item.fieldtype eq "TEXTBOX"]--></fieldset><!--[/if]--></td></tr>
                <!--[/if]-->
            <!--[/if]-->
            <!--[/if]-->
        <!--[/if]-->
        <!--[/foreach]-->

    I appreciate any help!!!



    edited by: clickncook, Sep 13, 2007 - 05:44 PM
  • Have you put in

    Code

    <!--[ pndebug ]-->
    into your Template to check for the available variables?

    --
    best regards from Kiel, sailing city

    Steffen Voss

    Member of the Zikula Steering Committee
    Read The Zikulan's Blog "If you want people to RTFM, make a better FM!"
  • I have not, I can't get on to my server until monday so I'll try then but will that display what variables are available and how to correctly call them?
  • Yes. I will open a popup (so check you popup blocker!!) There should be a table with all available variables. (This works in every template, BTW)

    Find the variable you need and put it into the pnRender delimiters:

    Code

    <!--[ $yourVariable ]-->


    --
    best regards from Kiel, sailing city

    Steffen Voss

    Member of the Zikula Steering Committee
    Read The Zikulan's Blog "If you want people to RTFM, make a better FM!"
  • Speaking of templating with pnProfile...
    I've been using pnProfile .40 for some time with PN 7.6.4 without any troubles. I have it layed out and tabled the way I like to fit my site. When I've tried upgrading to recent versions it completely destroys my site. Profiles are displayed on the left and the rest of the site is pushed over to the right creating a gigantic side scroll and a very retarded looking site. I don't really see a cause for this if everything is overwritten during an upgrade. I was quite expecting to have to remodel the template again but this baffles me. Any thoughts or ideas why this occurs? When I downgrade back to version .40 everything is back as it should be...
  • Store your customized templates in /themes/yourTheme/templates/modules/pnProfile
    They won't be overwritten on the update. If there are new functions in the templates you will be able to port them yourself.

    --
    best regards from Kiel, sailing city

    Steffen Voss

    Member of the Zikula Steering Committee
    Read The Zikulan's Blog "If you want people to RTFM, make a better FM!"
  • Where do I input the pnRender delimiters? Thank your all the info BTW!
  • The delimiters are these strange brackets:

    Code

    <!--[

    Code

    ]-->

    In between them you put the variables, the plugins calls or the operations:

    Code

    <!--[ $myVariable ]-->


    For a brief overview see the pnRender Cheatsheet 1.0

    --
    best regards from Kiel, sailing city

    Steffen Voss

    Member of the Zikula Steering Committee
    Read The Zikulan's Blog "If you want people to RTFM, make a better FM!"
  • clickncook

    Where do I input the pnRender delimiters?


    Now sure what you are asking here..

    If you are asking how to call a pnRender element in an HTML template you use comment style tags.

    Code

    <--[RenderMe]-->


    If you are asking how to separate the function values only spaces are needed

    Code

    <--[RenderMe value1="1" value2="A"]-->



    --
    David Pahl
    Zikula Support Team
  • Ok....first I tried your website Kaffeeringe, could translate the language! icon_biggrin

    I'm still a little unclear on where exactly ( what files ) i need to insert the delimiters. Is it somewhere in the pnRender files or on my pnProfile template?

    And last, i've finally gotten a change to try the debug and it brings up my variables. If I want to call up what is shown in the debug console as:
    $profile} Array (14)
    _quote => Array (6)
    value => If you worry about yesterday's failur...
    public_status => 0
    active => 1
    description => Quote
    shown => 1
    fieldtype => STRING

    How would I call this value up in my pnprofile template?
    I greatly appreciate your help, I've tried changing my code around so many times and I can't figure it out!!!!!!!!!!!
  • NEVER MIND!! I GOT IT......

    Code

    <!--$profile._function.value-->

    Etc....

    Now alot more makes sense!! Thank you both sooo much!

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