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

Support Forum

Start ::  PostNuke 0.7 Support ::  XTE Support ::  Different template if displaying allstories?

Moderated by: Support Team

Bottom
Different template if displaying allstories?

  • Link to this postingPosted: 11.02.2008, 06:41
    Profile
    ToonDawg
    rank:
    pnFreshman pnFreshman
    registered:
     April 2006
    Status:
    offline
    last visit:
    11.02.08
    Posts:
    42
    I am attempting to create a different template for the news/topic module *if* allstories equals 1. Before I started using Xanthia, I hard-coded another function in my theme.php and in the News module.

    Is there a way to create a new function in Xanthia other than themeindex and themearticle?

    Or is it possible to do this in my News-index.htm template? I attempted this:

    Code
    <!--[if allstories eq 1]-->
    <li><span class="pn-normal"><strong><!--[$preformat.catandtitle]--></strong> - <!--[pnml name=_POSTEDBY]-->: <!--[$info.informant]--> <!--[pnml name=_ON]--> <!--[$info.briefdatetime]--> - <!--[$info.counter]--> reads</span></li>
    <!--[else]-->
    <!-- Begin article -->more stuff  <!--[/if]-->

    but it didn't work - assuming since there's not a Xanthia tag for that?
    I also tried this as noted in another thread:
    Code
    <!--[pnvarcleanfrominput name="module" assign=module]-->
    <!--[if $module == 'Topic']-->blah blah
    <!--[else]-->stuff  <!--[/if]-->


    I only want this if the URL is http://www.nukesite.com/Topic*all.html (where all news stories are listed).



    edited by: ToonDawg, Feb 11, 2008 - 07:18 AM
  • Link to this postingPosted: 11.02.2008, 09:35
    Profile Homepage
    kaffeeringe.de
    rank:
    pnProfessional pnProfessional
    registered:
     September 2002
    Status:
    offline
    last visit:
    11.05.08
    Posts:
    745
    pnvarcleanfrominput fetches parameters from the URL. So if you are looking for the value of the parameter "allstories" you should use that name:
    Code
    <!--[pnvarcleanfrominput name='allstories' assign='allstories']-->
    <!--[if $allstories == 1]-->
      blah blah
    <!--[else]-->
      stuff 
    <!--[/if]-->

    -----
    best regards from Kiel, sailing city

    Steffen Voß

    Member of the PostNuke Steering Committee
    Visit: Kaffeeringe.de - Internet & Kreativität

Start ::  PostNuke 0.7 Support ::  XTE Support ::  Different template if displaying allstories?

Main Menu

Extensions Database

Documentation

Development

Login





 


 Log in Problems?
 New User? Sign Up!

Donate to PostNuke