Page 1 of 1

News Module: MicroManagement Possible?

Posted: Sun Nov 05, 2006 7:47 pm
by ostricized
Hi!

I am looking to see if anyone has done the following with News Module;

Code: Select all

{cms_module module="news" number="10" category='{title}'}
Goal: Having category specific news articles using the same template for multiple categories of news. Only way I could think to do this (I am NO programmer, I am a designer) is using the page title {title} which passes the variable(?) I need to accomplish this.

Problem: Can't seem to use {} inside {} (result {{}})

Has anyone approached this before?

Example URI: http://mm.drunkenlords.com/breaking_news/

The section that I would like to apply the example code in is the '{title} Archives' - The archives should be category specific on this page, however they are not, and all articles are displayed.

Re: News Module: MicroManagement Possible?

Posted: Sun Nov 05, 2006 8:12 pm
by tsw
I wouldn't use title as it may contain very long string. use page name instead like this

{cms_module module="news" number="10" category=$page_name}

ps. {get_template_vars} is a nice way to find out what variables you can use

hope this helps

Re: News Module: MicroManagement Possible?

Posted: Sun Nov 05, 2006 9:10 pm
by ostricized
tsw: thank you very much for the super quick response - I'll let you know if I get it to worky!

Re: News Module: MicroManagement Possible?

Posted: Tue Nov 07, 2006 2:22 am
by ostricized
TSW: No such luck using $page_name. Thanks again for the support!

Re: News Module: MicroManagement Possible?

Posted: Tue Nov 07, 2006 3:24 pm
by tsw
works here like a charm, are you sure you named your categories right. check the page variable content with get_template_vars or look at options tab when editing content. $page_name = alias

hope this helps

Re: News Module: MicroManagement Possible?

Posted: Tue Nov 14, 2006 12:28 am
by ostricized
I figured out the problem. The $page_name value was *NOT* the value I needed to use. It was $page_title. The reason I could not use $page_name was as follows;

$page_name = upcoming_events
$page_title = Upcoming Events

Needed title because I changed the title after I designed the page to remove the underscore (doesn't look good) and capitalize the text.

Thanks your support was the trick and enough time for me to understand.