Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By Dubber Dan on
How do I go about having the latest 3 or 4 blog entries appearing after the intro text on this page
Comments
Some options
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.
I don't think the frontpage
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?
anyone know an answer the
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?"
$node->nid
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, ..
Erm, I'm guessing that will
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?
Well
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:
Ah that makes sense now,
Ah that makes sense now, thanks for that.