News Category Pages (gimme a hand)

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
sam_butler
Forum Members
Forum Members
Posts: 24
Joined: Sun Jul 20, 2008 3:36 pm
Location: Manchester, UK

News Category Pages (gimme a hand)

Post by sam_butler »

This was posted in Product Support but no takers so far. I'm getting nervous so instead of going crazy I thought I'd bring it here:
[Taken to the forum after brief message discussion with Mark!]

Okay, orientation: News template. Here's the issue:

I want my summary templates to display the category as usual, but with the category name as a link to a summary page for *that category only*. Dynamically creating such links is proving to be a nightmare. I know I can create a page with a News call using the category parameter but when I turn the site over to my client they would have to create such a page each time they added a news category, unless I made it static (which would be odd). Hope you're tracking with me so far...

When I use the browsecat param the pretty URLs break down as well, so each category link's URL has a huge and very ugly query string appended. I don't want this, also for security purposes. I would much rather this all be dynamic but I don't know how and can't seem to find the answer.

Over to the community...
sam_butler
Forum Members
Forum Members
Posts: 24
Joined: Sun Jul 20, 2008 3:36 pm
Location: Manchester, UK

Re: News Category Pages (gimme a hand)

Post by sam_butler »

ugh.
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm
Location: Comox Valley, BC

Re: News Category Pages (gimme a hand)

Post by Nullig »

I think you could use a UDT to automatically create a page for newly added categories whenever the NewsCategoryAdded event is fired. All you have to do is use the same sql for adding page content - have a look at the class.content.inc.php in the /lib/classes directory to see the syntax for adding content.

Nullig
Last edited by Nullig on Thu Jul 24, 2008 7:19 pm, edited 1 time in total.
Post Reply

Return to “Developers Discussion”