News module problem - news detail page messes with CMS {content} placeholder
Posted: Wed Oct 27, 2010 11:40 pm
Howdy. I am using the News module and have come across some problematic behaviour which I am unsure how to fix.
I am calling the news module via a CMS template where the relevant section looks like this:
I have two custom news templates setup, one for the summary listing and one for the detail listing.
The summary listing page renders as expected when a page associated with the above CMS template is called:
The string "Announcements" is from the contents of the default content placeholder in the CMS template.
However the news detail template is messed up once rendered. What is happening is that the news detail element appears to be getting stuffed into the content tag of the CMS template and then an unwanted summary listing is being inserted where the original "{news}" tag was located:
I have taken an initial look at the code but am not immediately sure where this issue is occurring. I am guessing that there is a recursive eval() happening somewhere where it should not be but so far have not been able to nail it down.
Any help on fixing this much appreciated.
Cheers
I am calling the news module via a CMS template where the relevant section looks like this:
Code: Select all
<div id="main_content">
<h1>{content label="main heading" oneline="true" default=""}</h1>
{news category="$mySectionAlias"}
</div>
I have two custom news templates setup, one for the summary listing and one for the detail listing.
The summary listing page renders as expected when a page associated with the above CMS template is called:
Code: Select all
<h1>Announcements</h1>
<!-- Displaying News Module -->
<!-- News Categories: 'example-category' -->
<!-- Start News Display Template -->
<ul id="file_listing">
<li><a href="http://127.0.0.1/example_site/news/7/73/Next-board-meeting-October-27th.html" title="Next board meeting October 27th">Next board meeting October 27th</a>
</li>
<li><a href="http://127.0.0.1/example_site/news/6/73/Send-the-office-your-best-photos.html" title="Send the office your best photos">Send the office your best photos and check out pictures of the 2010 Olympics here.</a>
</li>
</ul>
<!-- End News Display Template -->
However the news detail template is messed up once rendered. What is happening is that the news detail element appears to be getting stuffed into the content tag of the CMS template and then an unwanted summary listing is being inserted where the original "{news}" tag was located:
Code: Select all
<h1> <h3 id="NewsPostDetailTitle">Next board meeting October 27th</h3>
<hr id="NewsPostDetailHorizRule" />
<div id="NewsPostDetailContent">
Next board meeting October 27th
</div>
<div id="NewsPostDetailReturnLink"><a href="http://127.0.0.1/example_site/news-page.html">Return</a></div>
</h1>
<!-- Displaying News Module -->
<!-- News Categories: 'example-category' -->
<!-- Start News Display Template -->
<ul id="file_listing">
<li><a href="http://127.0.0.1/example_site/news/7/73/Next-board-meeting-October-27th.html" title="Next board meeting October 27th">Next board meeting October 27th</a>
</li>
<li><a href="http://127.0.0.1/example_site/news/6/73/Send-the-office-your-best-photos.html" title="Send the office your best photos">Send the office your best photos and check out pictures of the 2010 Olympics here.</a>
</li>
</ul>
<!-- End News Display Template -->
Any help on fixing this much appreciated.
Cheers