1
baloch
Need help regarding news layout by topic
  • 2007/5/30 13:16

  • baloch

  • Just popping in

  • Posts: 34

  • Since: 2006/3/22


News Display Layout

Classic shows all news ordered by date of publish. News by topic will group the news by topic with the latest story in full and the others with just the title.

now i want to use news by topic but i want to display 3-5 artilces in full and others with just title instead of displaying latest story in full.

how can i do that?
Plz help

2
nachenko
Re: Need help regarding news layout by topic
  • 2007/5/30 13:49

  • nachenko

  • Quite a regular

  • Posts: 356

  • Since: 2005/1/18


It's just a template problem. Just edit the template so XOOPS gives no "special consideration" to first item.

3
baloch
Re: Need help regarding news layout by topic
  • 2007/5/30 13:56

  • baloch

  • Just popping in

  • Posts: 34

  • Since: 2006/3/22


I dont think it is defined in template. it might be somewhere defined in classes. but i canot find it.
i checked in XOOPS version and modinfo it is there but cannot find the link to where it is defined i mean the number of the topics etc

4
nachenko
Re: Need help regarding news layout by topic
  • 2007/5/30 14:09

  • nachenko

  • Quite a regular

  • Posts: 356

  • Since: 2005/1/18


Yes, it's defined in template. I know it for sure because i changed it for one customer some time ago.

Just paste the template code here.

5
baloch
Re: Need help regarding news layout by topic
  • 2007/5/30 14:18

  • baloch

  • Just popping in

  • Posts: 34

  • Since: 2006/3/22


news_bY_topic.html

div class="item">
<table width='100%' border='0'>
<tr>
<{section name=i loop=$columns}>
<td width="<{$columnwidth}>%" valign="top">
<{foreach item=topic from=$columns[i]}>
<div class="itemBody">
<div class="itemInfo"><span class="itemText"><a href="<{$xoops_url}>/modules/news/index.php?storytopic=<{$topic.id}>"><{$topic.title}></a></span></div>
<{counter start=0 print=false assign=storynum}>
<{foreach item=story from=$topic.stories}>
<{if $storynum == 0}>
<{include file="db:news_item.html" story=$story}><br />
<{else}>
<{if $storynum == 0}>
<ul>
<{/if}>
<li><a href="<{$xoops_url}>/modules/news/article.php?storyid=<{$story.id}>"><{$story.title}></a> (<{$story.posttime}>)</li>
<{/if}>
<{counter}>
<{/foreach}>
<{if $storynum > 0}>
</ul>
<a href="<{$xoops_url}>/modules/news/index.php?storytopic=<{$topic.id}>"><{$lang_morereleases}><{$topic.title}></a>
<{/if}>
</div><br />
<{/foreach}>
</td>
<{/section}>
but i want this to show three topics in full and the rest in title in news by topic mode. i dont want the classic one
thanks in advance

6
nachenko
Re: Need help regarding news layout by topic
  • 2007/5/30 15:23

  • nachenko

  • Quite a regular

  • Posts: 356

  • Since: 2005/1/18


OK. Replace this...

Quote:

<{if $storynum == 0}>
<{include file="db:news_item.html" story=$story}><br />



By this...

Quote:
<{if $storynum < 3}>
<{include file="db:news_item.html" story=$story}><br />

7
baloch
Re: Need help regarding news layout by topic
  • 2007/5/30 18:45

  • baloch

  • Just popping in

  • Posts: 34

  • Since: 2006/3/22


Thanks a ton dude. it worked

Login

Who's Online

228 user(s) are online (136 user(s) are browsing Support Forums)


Members: 0


Guests: 228


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits