I have a problem with the news module that when a news item is opened I would like to show the other news items in a summary under the main news item. But when I trie to do that I also see the news item I just opened in the summary of news items.
Is there a way to only show other news items in a summary?
I open the full news item in the {content} of the same page now.
Thanks for your help.
Show other news summary than opened news item
Re: Show other news summary than opened news item
Basic idea is not to summary of article that is opened, So if you want to show 4 summaries there will be only 3. Further adjustment have to be done to show 4 articles. Follow steps:
1. Add this line to News detail template. It we will use it to recognize what news article is opened.
3. Modify page template to display news summary according variable {$current_news_id}. It is important to generate page content before displaying news summary. Content is saved to variable {$new_content}
1. Add this line to News detail template. It we will use it to recognize what news article is opened.
2. Modify appropriate News summary template to exclude article that is being viewed (i guess it you are news summaries somewhere in page template).{assign var='current_news_id' value=$entry->id}
{foreach from=$items item=entry}
{if $current_news_id != $entry->id}
...{* your summary template *}
{/if}
{/foreach}
3. Modify page template to display news summary according variable {$current_news_id}. It is important to generate page content before displaying news summary. Content is saved to variable {$new_content}
That's about it. I if it does not work attach templates: page, news summary and news detail to your new message and post link page.{content assign='new_content'}
{if !empty($current_news_id)}
{news number='4' lang='lt_LT' summarytemplate='small_summary' }
{else}
{news number='5' lang='lt_LT' summarytemplate='small_summary' }
{/if}
...
{$new_content} {*put content to its normal position*}
...