Is it possible to remove news from the news page?

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
earcandy
Forum Members
Forum Members
Posts: 58
Joined: Sat Jan 11, 2014 4:37 pm

Is it possible to remove news from the news page?

Post by earcandy »

Looks sort of silly to have the news summary appearing on the news detail page.

Is there a way to remove it from the news page?

The news detail template in use:

Code: Select all

{* 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}

{assign var='newstitle'  value=$entry->title} 

<div class="NewsDetailRow">
{if $entry->postdate}
	<div id="NewsPostDetailDate">
		{$entry->postdate|cms_date_format}
	</div>
{/if}
<div class="NewsDetailRowSeparator float-left">|</div>
{if $entry->author}
	<div id="NewsPostDetailAuthor">
		{$author_label} <span>{$entry->author}</span>
	</div>
{/if}
<div class="NewsDetailRowSeparator float-left">|</div>
{if $entry->category}
	<div id="NewsPostDetailCategory">
		{$category_label} {$entry->category}
	</div>
{/if}
</div>

{if $entry->summary}
	<div id="NewsPostDetailSummary">
		{eval var=$entry->summary}
	</div>
{/if}

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

{if $entry->extra}
	<div id="NewsPostDetailExtra">
		{$extra_label} {$entry->extra}
	</div>
{/if}

{if $return_url != ""}
<div id="NewsPostDetailReturnLink">{$return_url}{if $category_name != ''} - {$category_link}{/if}</div>
{/if}

{if isset($entry->fields)}
  {foreach from=$entry->fields item='field'}
     <div class="NewsDetailField">
        {if $field->type == 'file'}
	  {* this template assumes that every file uploaded is an image of some sort, because News doesn't distinguish *}
          <img src="{$entry->file_location}/{$field->value}"/>
        {else}
          {$field->name}:&nbsp;{eval var=$field->value}
        {/if}
     </div>
  {/foreach}
{/if}

User avatar
Dr.CSS
Moderator
Moderator
Posts: 12709
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Is it possible to remove news from the news page?

Post by Dr.CSS »

If you don't want the summary to show in the 'detail' just remove this part...

{if $entry->summary}
<div id="NewsPostDetailSummary">
{eval var=$entry->summary}
</div>
{/if}
Locked

Return to “Modules/Add-Ons”