| View previous topic :: View next topic |
| Author |
Message |
moromete Private
Joined: 20 Sep 2007 Posts: 14
|
Posted: Fri Oct 05, 2007 6:23 am Post subject: Categories position in column not row |
|
|
| I would like the categories to be listed from top to bottom not in column not in rows from left to right… how can I change this? |
|
| Back to top |
|
 |
admin Site Admin

Joined: 01 Jan 1970 Posts: 582 Location: Somewhere on planet Earth ....
|
Posted: Fri Oct 05, 2007 7:17 am Post subject: |
|
|
The following breaks your categories on 2 columns:
| Code: |
{if $smarty.foreach.categories.iteration is div by 2}
</tr><tr>
{elseif not $smarty.foreach.categories.last}
<td> </td>
{/if}
|
_________________ Best regards,
Pavel Golovko
---------------------------
Help me help you. I'm not a God, and can not read your mind. If you got a problem, then please describe it well. |
|
| Back to top |
|
 |
moromete Private
Joined: 20 Sep 2007 Posts: 14
|
Posted: Fri Oct 05, 2007 7:34 am Post subject: |
|
|
Yes I know..but I want the order to be from top to bottom not from left to right
Now it is:
AAAA BBBB CCCC
DDDD EEEE FFFFF
And I want it:
AAAA CCCC EEEE
BBBB DDDD FFFF |
|
| Back to top |
|
 |
moromete Private
Joined: 20 Sep 2007 Posts: 14
|
Posted: Fri Oct 05, 2007 12:28 pm Post subject: |
|
|
| Any ideea? |
|
| Back to top |
|
 |
moromete Private
Joined: 20 Sep 2007 Posts: 14
|
Posted: Sun Oct 07, 2007 3:31 am Post subject: Hello? |
|
|
| Please ..can someone help me...? |
|
| Back to top |
|
 |
admin Site Admin

Joined: 01 Jan 1970 Posts: 582 Location: Somewhere on planet Earth ....
|
Posted: Sun Oct 07, 2007 5:11 am Post subject: |
|
|
Could you by any chance post a URL of the directory where you're trying to apply the above mod? _________________ Best regards,
Pavel Golovko
---------------------------
Help me help you. I'm not a God, and can not read your mind. If you got a problem, then please describe it well. |
|
| Back to top |
|
 |
moromete Private
Joined: 20 Sep 2007 Posts: 14
|
Posted: Sun Oct 07, 2007 10:37 am Post subject: |
|
|
I run it local to test it on xaamp server..so i can't give you a link...but i think you understand what i want...
The categories order should be from top to bottom not from left to right |
|
| Back to top |
|
 |
admin Site Admin

Joined: 01 Jan 1970 Posts: 582 Location: Somewhere on planet Earth ....
|
Posted: Sun Oct 07, 2007 8:30 pm Post subject: |
|
|
I showed you how to split your category results. All you have to do is play with your HTML templates  _________________ Best regards,
Pavel Golovko
---------------------------
Help me help you. I'm not a God, and can not read your mind. If you got a problem, then please describe it well. |
|
| Back to top |
|
 |
moromete Private
Joined: 20 Sep 2007 Posts: 14
|
Posted: Mon Oct 08, 2007 12:22 am Post subject: |
|
|
I have tried but nothing worked... if it's simple... please show me.
Thank You. |
|
| Back to top |
|
 |
admin Site Admin

Joined: 01 Jan 1970 Posts: 582 Location: Somewhere on planet Earth ....
|
Posted: Mon Oct 08, 2007 2:46 am Post subject: |
|
|
Ok, lets try this together... What troubles you the most, HTML or Smarty? What have you tried so far? _________________ Best regards,
Pavel Golovko
---------------------------
Help me help you. I'm not a God, and can not read your mind. If you got a problem, then please describe it well. |
|
| Back to top |
|
 |
admin Site Admin

Joined: 01 Jan 1970 Posts: 582 Location: Somewhere on planet Earth ....
|
Posted: Mon Oct 08, 2007 3:40 am Post subject: |
|
|
This should give you a good start:
| Code: |
<table border="0" width="95%" cellspacing="5" cellpadding="5"><tr><td>
{foreach from=$categories key=key item=i name=cat}
{if $smarty.foreach.cat.index % 5 == 0}
</td><td>
{/if}
<font size="2"><img src="/images/folder1.gif"> <b><a href="{$i.path}/">{$i.title}</a></b> ({$i.links_num})<br></font>
{if $sub_cats}
<table border="0"><tr><td><font size="1">
{foreach from=$sub_cats item=sub key=subs}
{if $sub.parent == $i.id}
· <a href="{$i.path}/{$sub.path}/">{$sub.title}</a>
{/if}
{/foreach}
</font></td></tr></table>
{/if}
<hr>
{/foreach}
</td></tr></table>
|
I've placed categories vertically, though its up to you to match it with your templates.
Again, look at the Smarty manual: http://smarty.php.net/manual/en/language.function.foreach.php _________________ Best regards,
Pavel Golovko
---------------------------
Help me help you. I'm not a God, and can not read your mind. If you got a problem, then please describe it well. |
|
| Back to top |
|
 |
moromete Private
Joined: 20 Sep 2007 Posts: 14
|
Posted: Sun Oct 14, 2007 5:15 am Post subject: Thank you |
|
|
Thank you for your help.
It still dose not work, but it's ok... i will try other methods. |
|
| Back to top |
|
 |
|