Page 1 of 1

News and Breadcrumbs

Posted: Thu Jul 12, 2007 1:34 am
by harleyquinn
I'm working on an article driven website, and I'd like to be able to have my breadcrumbs reflect the article titles. I've searched the forum and saw a few others were also looking to do this, but nothing was posted on how to accomplish this. I also looked in the Forge to see if there were any patches, but nothing came up.

Right now my breadcrumbs looks like:
You are here: Home » News
But I would like it to look like this:
You are here: Home » News » Article Title
I have News 2.2 installed and running CMS 1.0.8. I have also implemented search engine friendly urls with the news module.

Anyone have any ideas?

Re: News and Breadcrumbs

Posted: Fri Jul 13, 2007 3:59 pm
by harleyquinn
Can someone please clalify something for me? I have been frantically searching the forums with no luck trying to figure out why my breadcrumbs aren't working with my pretty news urls which I accomplished following the instructions from this post:
http://forum.cmsmadesimple.org/index.php/topic,5012.0.html

After reading and re-reading that post numerous times to make sure I didn't miss something, I realized that in the patched file News.module.php this piece of code may be the reason why I can't have breadcrumbs show news titles and why detailpage param in {news} tag doesn't work:

Code: Select all

$this->RegisterRoute('/(?P<module>News)\/.*?\/.*\-(?P<articleid>[0-9]+)$/', array('returnid'=>'45'));
So to clarify, '45' from the above code refers to the page id where the news details will be displayed, right? If this is the case, it would explain why when I used the parameter detailpage in my {news} tag, that it still used the page with the id '45' to display the details instead of using my detailpage param that I specified in the news tag, right?

If this is the case it would explain 2 things that are driving me crazy:

1) why the breadcrumbs don't show the title of the article - technically it is displaying the correct path; there just is no way to show the title of the article in the breadcrumbs cause that page really doesn't exist, right? It does show the path of the page the detail is displayed on, which makes sense. Is having the breadcrumbs show the news article title even possible?

2) why the detailpage param does not work - because '45' is the page where detailed news article is displayed. If I change '45' to a different id then it shows the details on that page, so basically that page id in the code above overrides the news param detailpage, right?

Can someone please confirm if I am right, cause if so, I'm gonna stop pulling out my hair, move on, and keep my fingers crossed that when CMSMS 2.0 is released, that these features will be built in.

Anyone? Help! Help! I'm going nuts!  ???