How do I go about having the latest 3 or 4 blog entries appearing after the intro text on this page

www.technohippy.org.uk/ramblings

Comments

wmostrey’s picture

Hey Dan,

There are a few options to do that.

# Use the frontpage module
# Use a php page snippet, for instance: display the (x) most recent weblog entries with teasers & info.

Dubber Dan’s picture

I don't think the frontpage module is the right one for as the page I want it on isn't the front, but your second suggestions looks promising.

I'd like to keep markup and content seperate and I seem to recall something about being able to create custom node.tpl.php file for specific nodes, or is that only possible for node types?

Dubber Dan’s picture

anyone know an answer the this:

"I'd like to keep markup and content seperate and I seem to recall something about being able to create custom node.tpl.php file for specific nodes, or is that only possible for node types?"

wmostrey’s picture

Well you could edit the node.tpl.php so that it starts with a php switch case, or an if else. $node->nid contains the node id, so you could create specific design for those nodes. You could do the same for specific node types, categories, ..

Dubber Dan’s picture

Erm, I'm guessing that will sort it but I'm blowed if I actually know what your talking about! Could explain a bit more for me?

wmostrey’s picture

Well you say you want a custom node.tpl.php for specific nodes. What I understand from that is that you want specific nodes, for instance node 17 and 65, to have their own lay-out. To accomplish this, put the following in node.tpl.php:

if ($node->nid=="17") {
// your specific code for node 17
}
elseif ($node->nid=="65") {
// your specific code for node 65
}
else {
// standard code
}
Dubber Dan’s picture

Ah that makes sense now, thanks for that.