custom news urls in cms 1.9.1
Posted: Wed Dec 01, 2010 7:42 pm
Hello,
I'm trying to take advantage of the new custom urls available in the News module. The news system works perfectly if I don't specify a custom URL, but whenever I specify one all I ever get is the 404 error page I've setup.
I've supplied a default news detail page as per the 'detail view settings' of the news option tab:
"This preference is used to determine a page (and therefore a template) to use to view detail pages. Individualized News Detail URLS will not work if this parameter is not set to a valid page. Additionally, if this preference is set, and no detailpage parameter is provided on the news tag, then this value will be used for detail links"
I've got mod_rewrite setup properly(the config works for all my other cms based sites). Could there be additional rewrite rules required?
Turning on debug gives me a couple of relevant queries when I try and view an article:
The above query returns the two test news articles with custom urls.
This is the next query, the cms then seems to try and find the alias 'brand-tone-of-voice', which is the news article url from cms_content and then fails, the rest of the code seems concerned with showing the 404 page.
If anyone has this successfully working or can point me in the right direction, I'd be very grateful.
Thanks,
Mark.
I'm trying to take advantage of the new custom urls available in the News module. The news system works perfectly if I don't specify a custom URL, but whenever I specify one all I ever get is the 404 error page I've setup.
I've supplied a default news detail page as per the 'detail view settings' of the news option tab:
"This preference is used to determine a page (and therefore a template) to use to view detail pages. Individualized News Detail URLS will not work if this parameter is not set to a valid page. Additionally, if this preference is set, and no detailpage parameter is provided on the news tag, then this value will be used for detail links"
I've got mod_rewrite setup properly(the config works for all my other cms based sites). Could there be additional rewrite rules required?
Turning on debug gives me a couple of relevant queries when I try and view an article:
Code: Select all
SELECT news_id,news_url FROM cms_module_news WHERE status = 'published' AND news_url != '' AND ( IFNULL(start_time, '1970-01-01 00:00:01') < NOW()) AND (( IFNULL(end_time, '1970-01-01 00:00:01') = '1970-01-01 00:00:01') OR (end_time > NOW())) ORDER BY news_date DESC
Code: Select all
SELECT * FROM cms_content WHERE content_alias = 'brand-tone-of-voice' AND active = 1
If anyone has this successfully working or can point me in the right direction, I'd be very grateful.
Thanks,
Mark.