I was wondering if it was possible to display the nodes in multiple column format.
Let me explain a little more in detail. Currently, when nodes are being listed, they are listed one post on one row like
LOGO
---------------------------------------------------------
navigation | node1
| node2
| node3
I would like to display 2 or more in a row instead, like:
LOGO
---------------------------------------------------------
navigation | node1 node2 node3
| node4 node5 node6
| node7 node8 node9
It may sound strange, but for what I am trying to accomplish , i really need this.
I would appreciate if you guys can point me in the right direction.
Thnx
KC
Comments
CSS
You could use CSS like this:
.node { width: 33%; float: left; }
Although this would also affect individual node views.
Use tables and PHP
This type of row structure is easier done with PHP and using a table or tables since you are litteraly changing the data to a tabular form. Find a template like chameleon or use phptemplate to get PHP going and then you should have no trouble finding a tutorial on how to set table rows using modulus.
---------------------------
info for Drupal installation
__________________________
Carl McDade
Information Technology Consult
Team Macromedia
www.hivemindz.com
a little bit more detail please
Steven, Carl,
Thanks for the quick replies. Carl's solution with php code sounds more like what I need, however I am not a php programmer. I know programming to a certain degree, so that I can probably find some tutorial or code examples and tweek it to get it to work for my situation, even Carl's snippet gives me a starting point, however I am not really sure where to put that code, and where those nodes are generated.
I would appreciate it if you guys can help me a little but more by pointing to the function or template, etc, where I need to tweek the code.
thanks again
kc
i could not find
I looked through the chamellon theme and was not able to find where these nodes are placed. There is a $content variable which seems like referring the nodes but could not find where this variable is defined. Just a little bit more help will really help me get started.
thnks
kc
Ok but
The $content variable is a serialized string I believe so to handle it you are going to have to break up the string into pieces. Otherwise you will have to hunt it down in each instance because it is used in all manner of functions throughout Drupal. I have tried myself to find a central point to break it down and found nothing. I finally settled on using PHPtemplate, breaking down the strings according to the HTML surrounding each node and then putting them back together in the manner I choose.
---------------------------
info for Drupal installation
__________________________
Carl McDade
Information Technology Consult
Team Macromedia
www.hivemindz.com
i am lost
Thanks Carl,
I am a bit lost though as a novice programmer, i this this project is beyond my reach. I will try to find someone who can look into it and modify the code for me.
I do apreciate your efforts to help me though.
kc
Article tutorial on multi-column solutions
http://www.alistapart.com/articles/flexiblelayouts/
Also check out the referenced "three columns design"-article-link in the top paragraph.
The article discusses various solutions.
Tables would sometimes be bad since content would only display after full table is rendered.
If you e.g have some slow-loading images then it would be rather annoying for readers.