1
figu78
News Module columns
  • 2008/1/24 14:59

  • figu78

  • Just popping in

  • Posts: 60

  • Since: 2006/8/19


Hi all,

Im going to use the news module as my homepage. I have configured the module to show the articles in 2 columns, the thing is that both columns has exactly the same width, and i would like something like 60%-40% instead of 50%-50%.

How could I change it??, I was loooking in the module templates, but i dont know where should i change it. Should I use CSS??

Cheers,
Figu

2
qcorek
Re: News Module columns
  • 2008/1/24 18:37

  • qcorek

  • Just popping in

  • Posts: 68

  • Since: 2007/10/7


template responsible fot news index page is


news_index.html;

i'm have learned php and smarty from editing XOOPS templates so i'm not sure m'i right but problem is sth right here

<{if $topic_rssfeed_link != ""}>
<div align='right'><{$topic_rssfeed_link}></div>
<{/if}>

<{if $displaynav == true}>
<div style="text-align: center;">
<form name="form1" action="<{$xoops_url}>/modules/news/index.php" method="get">
<{$topic_select}> <select name="storynum"><{$storynum_options}></select> <input type="submit" value="<{$lang_go}>" class="formButton" /></form>
<hr />
</div>
<{/if}>

<{if $topic_description != ''}>
<div style="text-align: center;"><{$topic_description}></div>
<{/if}>

<div style="margin: 10px;"><{$pagenav}></div>
<table width='100%' border='0'>
<tr>
<{section name=i loop=$columns}>
<td width="<{$columnwidth}>%"><{foreach item=story from=$columns[i]}><{include file="db:news_item.html" story=$story}><{/foreach}></td>
<{/section}>

</tr>
</table>

<div style="text-align: right; margin: 10px;"><{$pagenav}></div>
<{include file='db:system_notification_select.html'}>

3
figu78
Re: News Module columns
  • 2008/1/25 8:17

  • figu78

  • Just popping in

  • Posts: 60

  • Since: 2006/8/19


Im starting with all these things, so im not an expert about code, could someone guide me??.

Obviously The width of the colums should only apply to the News module.

Thanks in advance,
Figu.

4
figu78
Re: News Module columns
  • 2008/1/30 11:49

  • figu78

  • Just popping in

  • Posts: 60

  • Since: 2006/8/19


Nobody??

5
nachenko
Re: News Module columns
  • 2008/1/30 13:31

  • nachenko

  • Quite a regular

  • Posts: 356

  • Since: 2005/1/18


The bold code by qcorek is the key. You could set cell width if you could detect the first column, the second...

If you could set a "column counter".

And you can.

check "counter" in the Smarty manual. You'll get how to set a counter and use it in your template.

6
figu78
Re: News Module columns
  • 2008/1/30 15:11

  • figu78

  • Just popping in

  • Posts: 60

  • Since: 2006/8/19


Ufff, this sounds like chinese for me, but i will try to look at the smarty manual.

I will try, but dont be shy, and show me some exmaples if you want

Thanks guys

Login

Who's Online

75 user(s) are online (48 user(s) are browsing Support Forums)


Members: 0


Guests: 75


more...

Donat-O-Meter

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

Latest GitHub Commits