xoops forums

figu78

Just popping in
Posted on: 2008/1/24 14:59
figu78
figu78 (Show more)
Just popping in
Posts: 60
Since: 2006/8/19
#1

News Module columns

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

qcorek

Just popping in
Posted on: 2008/1/24 18:37
qcorek
qcorek (Show more)
Just popping in
Posts: 68
Since: 2007/10/7
#2

Re: News Module columns

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'}>

figu78

Just popping in
Posted on: 2008/1/25 8:17
figu78
figu78 (Show more)
Just popping in
Posts: 60
Since: 2006/8/19
#3

Re: News Module columns

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.

figu78

Just popping in
Posted on: 2008/1/30 11:49
figu78
figu78 (Show more)
Just popping in
Posts: 60
Since: 2006/8/19
#4

Re: News Module columns

Nobody??

nachenko

Quite a regular
Posted on: 2008/1/30 13:31
nachenko
nachenko (Show more)
Quite a regular
Posts: 356
Since: 2005/1/18
#5

Re: News Module columns

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.

figu78

Just popping in
Posted on: 2008/1/30 15:11
figu78
figu78 (Show more)
Just popping in
Posts: 60
Since: 2006/8/19
#6

Re: News Module columns

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