Astanda.com forums Forum Index

Rate ADP:   
Astanda.com forums

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Categories position in column not row

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Astanda.com forums Forum Index -> ADP templates
View previous topic :: View next topic  
Author Message
moromete
Private


Joined: 20 Sep 2007
Posts: 14

PostPosted: Fri Oct 05, 2007 6:23 am    Post subject: Categories position in column not row Reply with quote

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
View user's profile Send private message
admin
Site Admin


Joined: 01 Jan 1970
Posts: 582
Location: Somewhere on planet Earth ....

PostPosted: Fri Oct 05, 2007 7:17 am    Post subject: Reply with quote

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>&nbsp;</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
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
moromete
Private


Joined: 20 Sep 2007
Posts: 14

PostPosted: Fri Oct 05, 2007 7:34 am    Post subject: Reply with quote

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
View user's profile Send private message
moromete
Private


Joined: 20 Sep 2007
Posts: 14

PostPosted: Fri Oct 05, 2007 12:28 pm    Post subject: Reply with quote

Any ideea?
Back to top
View user's profile Send private message
moromete
Private


Joined: 20 Sep 2007
Posts: 14

PostPosted: Sun Oct 07, 2007 3:31 am    Post subject: Hello? Reply with quote

Please ..can someone help me...?
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 01 Jan 1970
Posts: 582
Location: Somewhere on planet Earth ....

PostPosted: Sun Oct 07, 2007 5:11 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
moromete
Private


Joined: 20 Sep 2007
Posts: 14

PostPosted: Sun Oct 07, 2007 10:37 am    Post subject: Reply with quote

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
View user's profile Send private message
admin
Site Admin


Joined: 01 Jan 1970
Posts: 582
Location: Somewhere on planet Earth ....

PostPosted: Sun Oct 07, 2007 8:30 pm    Post subject: Reply with quote

I showed you how to split your category results. All you have to do is play with your HTML templates Wink
_________________
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
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
moromete
Private


Joined: 20 Sep 2007
Posts: 14

PostPosted: Mon Oct 08, 2007 12:22 am    Post subject: Reply with quote

I have tried but nothing worked... if it's simple... please show me.
Thank You.
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 01 Jan 1970
Posts: 582
Location: Somewhere on planet Earth ....

PostPosted: Mon Oct 08, 2007 2:46 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
admin
Site Admin


Joined: 01 Jan 1970
Posts: 582
Location: Somewhere on planet Earth ....

PostPosted: Mon Oct 08, 2007 3:40 am    Post subject: Reply with quote

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>&nbsp;({$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
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
moromete
Private


Joined: 20 Sep 2007
Posts: 14

PostPosted: Sun Oct 14, 2007 5:15 am    Post subject: Thank you Reply with quote

Thank you for your help.
It still dose not work, but it's ok... i will try other methods.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Astanda.com forums Forum Index -> ADP templates All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group