how to use {get_template_vars}

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
User avatar
skully78
New Member
New Member
Posts: 5
Joined: Wed Jan 23, 2008 6:12 pm
Location: London

how to use {get_template_vars}

Post by skully78 »

Hi,

Can anyone pls show me the light:

I am trying to use a url parameter like so: http://skully/portfolio/?view=list

which will be used to decide which news summarytemplate to show in my global content block like this:

{If $params['view'] == 'list'}
   {news category="cat1" summarytemplate="summarylist"}
{else}
   {news category="cat1" summarytemplate="summarygrid"}
{/if}

How do I get that parameter out the $params array and into my logic?

Awesome, thanks for any advice
Skully
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: how to use {get_template_vars}

Post by jmcgin51 »

I believe you need to use print_r
User avatar
kbh
New Member
New Member
Posts: 3
Joined: Mon Apr 26, 2010 3:57 pm

Re: how to use {get_template_vars}

Post by kbh »

You need to modify your RewriteRule in .htaccess to let the "QUERY_STRING"-part be parsed by Apache.
http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: how to use {get_template_vars}

Post by calguy1000 »

Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Post Reply

Return to “CMSMS Core”