Page 1 of 1

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

Posted: Wed Apr 30, 2008 3:23 pm
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