I am looking for the best way to fix a node on the page.



Currently I have my theme looking for a certain node->type, $node->name and when it finds that it renders it in a special block.



But now I want something like:

------------------------------
|                            |
| Header                     |
------------------------------
|             |              |
|  node 15    |  node 3      |
|             |              |
|             |              |
------------------------------
|    other nodes             |
|                            |
------------------------------



The issue is that node 3 gets rendered before node 15 and I am using css to compensate.



I am thinking of hard coding both nodes into the theme->header() function directly and then unchecking 'post on frontpage'



Any other ideas????



Thanks,

-Aaron

Comments

jonbob’s picture

In this case, hard-coding the nodes into the theme seems like a reasonable solution. If you think the nodes featured at the top may change now and then, a more elegant solution might be to implement theme_settings() to take node IDs in the administration page for the theme, and then use variable_get to decide which nodes to display in the special boxes.

I'm assuming you want the nodes displayed on every page of the site. If you're just talking about the home page, make a custom module that implements _page and displays the two nodes before printing recent nodes by using code copied from node_page in node.module.

aheld’s picture

I actually just wanted this item on the home page.

I never thought about creating a node in order to just display a single page. That is exactly what I was looking for.

I have some other logic, such as showing a site intro to anonymous users that I hardcoded into the template that should be moved to this custom node as well.

Thanks!