Hi!
The {if] sentence used in templates is only for testing null variables? For instance, is there any way to use something like this?
{if title == "Homepage"}
Still no list of {} variables, right?
Thanks!
{if} syntax
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: {if} syntax
See this link:
http://forum.cmsmadesimple.org/index.ph ... cseen.html
It should help, but you're right there isn't a reference of already exported variables.
http://forum.cmsmadesimple.org/index.ph ... cseen.html
It should help, but you're right there isn't a reference of already exported variables.
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.
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.
Re: {if} syntax
Thanks. That solves half of my problems 
Any way to get modules variables that way? For instance, I would like to get the category field in the News module. $gCms doesn't have that info, $params['category'] also doesn't work. (This is VERY useful to use different templates for each category)
Thanks in advance!

Any way to get modules variables that way? For instance, I would like to get the category field in the News module. $gCms doesn't have that info, $params['category'] also doesn't work. (This is VERY useful to use different templates for each category)
Thanks in advance!
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: {if} syntax
see the post I just posted with the get_template_vars user defined plugin I wrote.
Technically speaking, putting this at the bottom of your content when you have other module tags above it, should give you an idea of the available smarty variables.
Technically speaking, putting this at the bottom of your content when you have other module tags above it, should give you an idea of the available smarty variables.
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.
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.
Re: {if} syntax
See in Summary template:rcpinheiro wrote: Any way to get modules variables that way? For instance, I would like to get the category field in the News module. $gCms doesn't have that info, $params['category'] also doesn't work.
Code: Select all
{foreach from=$items item=entry}
<div class="NewsSummary">
<div class="NewsSummaryLink">
{$entry->titlelink}
</div>
<div class="NewsSummaryCategory">
{$entry->category}
</div>
.........
Maybe:rcpinheiro wrote: (This is VERY useful to use different templates for each category)
{cms_module module="news" category="beer" summarytemplate="sometemplate.tpl"}
Alby
Re: {if} syntax
Thanks, so this should do it, right?calguy1000 wrote: see the post I just posted with the get_template_vars user defined plugin I wrote.
Code: Select all
$gCms->smarty->get_template_vars('category');