PDA

View Full Version : question about news by section in the bottom of homepage


tunatamaker
04-11-2008, 10:18 PM
I knwo that some templates towards the bottom of the homepage have recent news by "section" or "heading". My template however does not have that since I am using 4008. Is there a mod of widget I can use to adapt that?

Micha
04-12-2008, 03:48 PM
You can take that block from default theme of Vivvo and try to place it on 4008.

Open default.tpl for home page (I'm talking about default theme) and look for <!-- Main news --> comment.

Take the block of code bellow it, and place it in your template for homepage.
That should give you news sorted by category.

tunatamaker
04-13-2008, 04:04 PM
it doesn't work...I tired it yet it doesn't show the headings or anything.

Micha
04-14-2008, 08:59 AM
I've just looked at template 4008.
This template already have news sorted by category at bottom of the page.
Box is called "More News" and it should be last box on the center column with gray background.

tunatamaker
04-15-2008, 04:35 AM
k...I will see what you mean.

tunatamaker
05-02-2008, 02:40 AM
so is this right to display the bottom of the news section fine?
smily faces mean colons...dont know how to change that
<!-- Main news section -->
<vte: box module="box_sections">
<vte: params>
<vte: param name="cache" value="1" />
<vte: param name="search_ids" value="{VIVVO_MODULES_MORE_NEWS_CATEGORIES}" />
</vte: params>
<vte:template>
<div id="category_news_box" >
<div class="main_news_box_holder">
<div class="the_more_news"><h1>More News</h1></div>
<vte:for from="{categories}" step="2" key="category_index">
<div class="main_news_box_row">
<vte:foreach item = "category" from = "{categories}" loop="2" start="{category_index}">
<div id="box_more_category_list_{category.get_id}" class="main_news_category">
<div class="box_title">
<h4>
<a href="{category.get_href}"><vte:value select="{category.get_category_name}" /></a>
</h4>
<vte:foreach item = "sub_category" from = "{category.subcategories}" key="index">
<span>
<vte:if test="{index} != 1"> | </vte:if>
<a href="{sub_category.get_href}"><vte:value select="{sub_category.get_category_name}" /></a>
</span>
</vte:foreach>

Micha
05-02-2008, 09:51 AM
Here is the entire code for main news box:

<!-- Main news section -->
<vte:box module="box_sections">
<vte:params>
<vte:param name="cache" value="1" />
<vte:param name="search_ids" value="{VIVVO_MODULES_MORE_NEWS_CATEGORIES}" />
</vte:params>
<vte:template>
<div id="category_news_box" >
<div class="main_news_box_holder">
<vte:for from="{categories}" step="2" key="category_index">
<div class="main_news_box_row">
<vte:foreach item = "category" from = "{categories}" loop="2" start="{category_index}">
<div id="box_more_category_list_{category.get_id}" class="main_news_category">
<div class="box_title">
<h4>
<a href="{category.get_href}"><vte:value select="{category.get_category_name}" /></a>
</h4>
<vte:foreach item = "sub_category" from = "{category.subcategories}" key="index">
<span>
<vte:if test="{index} != 1"> | </vte:if>
<a href="{sub_category.get_href}"><vte:value select="{sub_category.get_category_name}" /></a>
</span>
</vte:foreach>
</div>
<div class="box_body">
<vte:box module="box_article_list">
<vte:params>
<vte:param name="search_sort_by" value="created" />
<vte:param name="search_limit" value="{VIVVO_MODULES_MORE_NEWS_ARTICLE_NUMBER}" />
<vte:param name="search_cid" value="{category.id}" />
<vte:param name="add_to_printed" value="true" />
<vte:param name="exclude_printed" value="true" />
</vte:params>
<vte:template>
<vte:foreach item = "article" from = "{article_list}" start="1" loop="1">
<vte:include file="{VIVVO_TEMPLATE_DIR}summary/morenews_short.tpl" />
</vte:foreach>
<ul>
<vte:foreach item = "article" from = "{article_list}" start="2">
<li><a href="{article.get_href}"><vte:value select="{article.title}" /><vte:if test="{article.get_link}"> <img src="{VIVVO_THEME}img/external.png" alt="{LNG_VISIT_WEBSITE}"/></vte:if></a></li>
</vte:foreach>
</ul>
</vte:template>
</vte:box>
</div>
</div>
</vte:foreach>
</div>
</vte:for>
</div>
</div>
</vte:template>
</vte:box>