News Module

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
IrisSaxo
New Member
New Member
Posts: 5
Joined: Wed Aug 07, 2013 11:51 am

News Module

Post 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?
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: News Module

Post 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).
Post Reply

Return to “Modules/Add-Ons”