news pretty urls - hacked, can i display sub cat in url??
Posted: Wed Apr 30, 2008 3:23 pm
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
also is it possible to change this:
but i want to be able to enter any "return id" in my code on my page eg:
is this possible?
Thanks,
Dave
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'));
Code: Select all
$this->RegisterRoute('/.*?\/.*\-(?P<articleid>[0-9]+)$/', array('returnid'=>'23', 'module' => 'News'));
Code: Select all
{news number='8' summarytemplate="HomePageOdEvent"
category="Events | Wellington" detailpage="WellingtonE"}
Thanks,
Dave