I have been trying to create a front page which has a different design from the ususal simple node listing.
What I mean is that I don't want the nodes to be just listed. I want to be able to have two columns at the top and the rest listed something looking like this:

Main Article
...
Article #1
...
Article #2
Article #3 Article #4 Article #5
...Article #6...
---------------------------------
...Article #7...
---------------------------------
........

I thought of making a copy from the node.module and editing it, but because I am a newby at drupal, that wasn't to succesfull... :(


Can anyone help me on this, or at least tell me where I have to start!




------------------

:? MultipleX

Comments

matt westgate’s picture

You'll want to at least modify the your_theme_node function for the theme that you are using. It will be in themes/your_theme/your_theme.theme

dries’s picture

Rather than forking the node module, I'd create a new module that implements the _link hook to register a single callback using menu(). Make the callback function perform a single SQL query to retrieve the nodes - much like node_page_default() in CVS HEAD - and position them as outlined. This should take no more than 40 lines of code. Next, make the new callback the front page using the Default front page setting.

Ian Ward’s picture

What about an index page under the following scenario:

Taxonomy AA's
...
Taxonomy AB's
...
Taxonomy AC's
Taxonomy AD's Taxonomy BA's Taxonomy BB's
...Taxonomy BC's...
---------------------------------
...Taxonomy BD's...
---------------------------------
........

Where I would also specify that I want the 5 latest articles for Tax. AA to appear on home page, 3 latest for AB, etc. Where do I start? Along the same route as the Article scenario above?

multiplex’s picture

Registering a callback using menu()? How do I do that..? I looked around for the _link and node_page_default() you mentioned but I just can't figure out what you mean by that. Could you explain it a bit more simple, please.

I like the idea of being able to seperate my articles using a taxonomy structure, but how do I build such a thing into the index page or the module for it?

Please, remember I am a newbie and have trouble working with these modules..., if you guys could refer me to piece of code or post some code snippets that would really help me.

I started altering the Article module so I can use the code used to build the index, but I am not getting very far!
Thanks.

-------------
:? MultipleX

andrewmlin’s picture

I believe I am in the same situation as you. I want to create a homepage based on the taxonomy. Did you ever figure this out? Could you enlighten me?