Page 1 of 1

News Category Pages (gimme a hand)

Posted: Wed Jul 23, 2008 6:15 pm
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...

Re: News Category Pages (gimme a hand)

Posted: Thu Jul 24, 2008 5:56 pm
by sam_butler
ugh.

Re: News Category Pages (gimme a hand)

Posted: Thu Jul 24, 2008 6:54 pm
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