PDA

View Full Version : Different Headlines on every categories


bloon
01-28-2008, 08:41 PM
I have headlines on my main page,but I would like to make different headlines on every categories.
So when someone click categories, they will see different headlines on every categories.
Lets say for sample, I have music category,technology,etc. And I want to put headlines music on music category, headlines technology on technology,etc (basicly different headlines).
How do you that?


Thanks

Micha
01-29-2008, 09:04 AM
You can include headlines in default template for category and add this line of code within <vte:params> for headlines to pull headlines from specific category:

<vte:param name="search_cid" value="{CURRENT_CATEGORY.get_id}" />

bloon
01-29-2008, 11:51 AM
You can include headlines in default template for category and add this line of code within <vte:params> for headlines to pull headlines from specific category:

<vte:param name="search_cid" value="{CURRENT_CATEGORY.get_id}" />

Is this supposed to be this code <vte: param name="search_id" value="{CURRENT_CATEGORY.get_id}" />??

1.What line number should I added this code on default.tpl?
2.How to make the headlines news as whole story (or maybe 200 words)? not only few lines of story on the headlines

Micha
01-29-2008, 02:12 PM
Take this block of code:

<vte:box module="box_article_list">
<vte:params>
<vte:param name="search_status" value="2" />
<vte:param name="search_limit" value="5" />
<vte:param name="search_sort_by" value="order_num" />
<vte:param name="search_order" value="descending" />
<vte:param name="cache" value="1" />
<vte:param name="add_to_printed" value="true" />
<vte:param name="exclude_printed" value="true" />
<vte:param name="search_cid" value="{CURRENT_CATEGORY.get_id}" />
</vte:params>
<vte:template>
<div id="headline" class="short_index">
<div class="short_holder_index">
<vte:foreach item = "article" from = "{article_list}">
<h2><a href="{article.get_href}"><vte:value select="{article.get_title}" /></a></h2>
<vte:value select="{article.get_summary}" />
</vte:foreach>
</div>
</div>
</vte:template>
</vte:box>

and place it inside your default template for category just bellow

<vte:if test="{PAGE_TITLE}">
<h1>
<vte:value select="{PAGE_TITLE}" />
</h1>
</vte:if>

For further customizations (headlines news as whole story, or 200 words) I suggest that you read Developer's guide:

http://www.vivvo.net/doc/v4/developer_manual/

bloon
01-29-2008, 10:21 PM
Hi Mitcha,

Thanks,

It worked, for the whole story headline, I change the line <vte:value select="{article.get_summary }" /> to <vte:value select="{article.get_body}" />

I can see the whole story on the headline, But "no Image" on the headline??
How to fix it?

Micha
01-30-2008, 08:40 AM
<vte:if test="{article.image}">
<div class="image">
<a href="{article.get_href}"><img src="{VIVVO_URL}thumbnail.php?file={article.get_image}&amp; size=summary_medium" alt="image" /><br /></a>
</div>
</vte:if>

bloon
01-30-2008, 11:42 AM
<vte:if test="{article.image}">
<div class="image">
<a href="{article.get_href}"><img src="{VIVVO_URL}thumbnail.php?file={article.get_image}&amp; size=summary_medium" alt="image" /><br /></a>
</div>
</vte:if>


Thanks,it worked , but the image is really small, how do you make bigger size?

(promise...last question :) )

Micha
01-30-2008, 01:27 PM
Change this value
size=summary_medium

You can find list of available sizes (default values) here:

http://www.vivvo.net/doc/v4/developer_manual/image_thumbnail.php

alex08
03-10-2008, 09:11 AM
Hi,

I can make headlines on every categories, but cannot make for each category its own headlines.

Can anyone help me, please?

Thank you.

Micha
03-10-2008, 09:38 AM
Not sure I quite understand you :confused:

Above is explained how to make headlines for category pages.

If you want different looking headlines on every category, you need to make custom category template for each category and custom looking headlines for each category view.

alex08
03-10-2008, 10:52 AM
Not sure I quite understand you :confused:

Above is explained how to make headlines for category pages.

If you want different looking headlines on every category, you need to make custom category template for each category and custom looking headlines for each category view.


I have followed exactly your instructions, but was able to make only identical headlines on each category :(

What was wrong?