Hi,
I'm a complete newbie at this, so I apologize in advance if this is a stupid question. I'm running CMSms 1.2.3, and this only involves the built-in news module.
Basically here's what I've got going on. I'd like to show only the news items in the category that matches the page title. So, for example, if the page title is "Test Page," I'd like the {news} tag to only generate those news articles that are in the "Test Page" category.
Is this at all possible?
Thanks so much for your help!
Aaron
Putting page title inside news tag
Re: Putting page title inside news tag
Hello,
please read the help of the {news...} tag call in the tag/module manager (in the admin) to learn how to use its category and so parameters.
Pierre M.
please read the help of the {news...} tag call in the tag/module manager (in the admin) to learn how to use its category and so parameters.
Pierre M.
Re: Putting page title inside news tag
Thank you for your reply. I'm sorry, I should have been clearer: is there any way to supply the category parameter dynamically?
So that I can use one template to display news from any category, based on the title of the page.
Thanks!
A--
So that I can use one template to display news from any category, based on the title of the page.
Thanks!
A--
Re: Putting page title inside news tag
It shouldn't be difficult :
-the title you want is in {title} so what about trying {news parameter=$title} ? (I'm not sure about this)
-or search the forum (with google) with these keywords : assign, capture, page alias, smarty, parameter...
Pierre M.
-the title you want is in {title} so what about trying {news parameter=$title} ? (I'm not sure about this)
-or search the forum (with google) with these keywords : assign, capture, page alias, smarty, parameter...
Pierre M.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: Putting page title inside news tag
{capture assign='mytitle'}{title}{/capture}
{news category="$mytitle"}
{news category="$mytitle"}
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.