Page 1 of 1

News Module

Posted: Thu Aug 08, 2013 12:22 pm
by IrisSaxo
I use the Module News on my website.
On my Homepage I display only the titles with "see more".
On a detailpage I display the whole newsarticles.
That works fine.

My problem: I want to display on every page the newstitles, but only for one category.
for example: page "dog" only the newsitems with category "dog", page "cat" only the newsitems with category "cat".
So the code is than

Code: Select all

{news number='5' category='dog'} for the page "dog"
{news number='5' category='cat'} for the page "cat"
I will put this in my template, but with generic code, so I want to change "dog" and "cat" to "page-alias", but I don't remember how I have to do that.
Something like this (but it doesn't work)

Code: Select all

{news number='5' category=$page-alias} 
Do you know what 's wrong with my code?

Re: News Module

Posted: Thu Aug 08, 2013 2:29 pm
by velden
Use {get_template_vars} somewhere in your template or content to see what variables are available.

Then you'll see it's $page_alias (underscore instead of hyphen).