Duplicated Content in News Module Details page

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
maryzaha
New Member
New Member
Posts: 9
Joined: Sat Jan 14, 2012 7:46 am

Duplicated Content in News Module Details page

Post by maryzaha »

Hi all!
First, I'd like to thank you for all your effort to bring this wonderful cms to life. I love it, so keep up the good work!
I have the following problem with the News Module:
I have created a number of field definition and have called them in the Details Template. However, when I click to open the particular news item where I need to have the content of the field definitions displayed, I can see that is gets duplicated. Is it something I've done in the Details Template that's causing the problem, and can it be fixed at all?
Here is a link to the details page:
http://hotel-country.com/news/3/57/Pari ... ty-Of-Love

Thanks very much and sorry if have posted in the wrong place :)

Before anybody rushes to answer let me tell you that I seem to have found a solution, I will posto what worked here, so that if anybody faces a similar issue they know what to do:
details template that gave me the duplication problem (by removing all that is in red below:

Code: Select all

{assign var="pagetitle" value=$entry->title|escape}

{* set a canonical variable that can be used in the head section if process_whole_template is false in the config.php *}
{if isset($entry->canonical)}
  {assign var='canonical' value=$entry->canonical}
{/if}


<h3 id="NewsPostDetailTitle">{$entry->title|cms_escape:htmlall}</h3>


{if isset($entry->fields)}
  [color=#FF0040]{foreach from=$entry->fields item='field'}[/color]
   
{$entry->fieldsbyname.search_widget->value}

[color=#FF4040]
  {/foreach}[/color]
{/if}


<div id="NewsPostDetailContent">

	{eval var=$entry->content}
</div>

{if isset($entry->fields)}
[color=#FF0040]  {foreach from=$entry->fields item='field'}[/color]
   
{$entry->fieldsbyname.map->value}

[color=#FF0040]  {/foreach}[/color]
{/if}


Template that made things work just fine:

Code: Select all

{assign var="pagetitle" value=$entry->title|escape}


{* set a canonical variable that can be used in the head section if process_whole_template is false in the config.php *}
{if isset($entry->canonical)}
  {assign var='canonical' value=$entry->canonical}
{/if}


<h1 style="font-size:16px; color:333; padding:10px; text-align:center; font-weight:bold; text-decoration:underline">{$entry->title|cms_escape:htmlall}</h1>


{if isset($entry->fields)}
  
{$entry->fieldsbyname.search_widget->value}


{/if}

	{eval var=$entry->content}
</div>
{if isset($entry->fields)}
   
{$entry->fieldsbyname.map->value}

{/if}

Post Reply

Return to “Modules/Add-Ons”