news pretty urls - hacked, can i display sub cat in url??

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
relic
Forum Members
Forum Members
Posts: 34
Joined: Fri Dec 08, 2006 9:59 am
Location: New Zealand

news pretty urls - hacked, can i display sub cat in url??

Post by relic »

hi there,

I have followed this: http://forum.cmsmadesimple.org/index.ph ... 12.30.html

but i have a question, is it possible to display the url in this format: /cat/sub-cat/title.xx instead of: /cat/title.xx ??

News.module.php

Code: Select all

// SEO URL hack
		$this->RegisterRoute('/.*?\/.*\-(?P<articleid>[0-9]+)$/', array('returnid'=>'23', 'module' => 'News'));
            $this->RegisterRoute('/[nN]ews\/(?P<articleid>[0-9]+)\/(?P<returnid>[0-9]+)\/d,(?P<detailtemplate>.*?)$/');
		$this->RegisterRoute('/[nN]ews\/(?P<articleid>[0-9]+)\/(?P<returnid>[0-9]+)\/d,(?P<detailtemplate>.*?)$/');
 		$this->RegisterRoute('/[nN]ews\/(?P<articleid>[0-9]+)\/(?P<returnid>[0-9]+)$/');
 		$this->RegisterRoute('/[nN]ews\/(?P<articleid>[0-9]+)$/');
 		$this->RegisterRoute('/[nN]ews\/(?P<action>rss)\/(?P<category>.*?)$/', array('showtemplate'=>'false'));
also is it possible to change this:

Code: Select all

$this->RegisterRoute('/.*?\/.*\-(?P<articleid>[0-9]+)$/', array('returnid'=>'23', 'module' => 'News'));
but i want to be able to enter any "return id" in my code on my page eg:

Code: Select all

{news number='8' summarytemplate="HomePageOdEvent" 
                      category="Events | Wellington" detailpage="WellingtonE"}
is this possible?

Thanks,
Dave
Post Reply

Return to “Modules/Add-Ons”