I put together a little theme snippet so I can place my "Read more" link after the teasers on my blog. The trouble is I'm not a coder and there is a good chance I made some really awful coding error that is going to cause problems later on. Can you have a look at the snippet and let me know how this can be improved. Here is the code:
<?php if ($page == 0): ?><?php if ($readmore): ?><p><?php print l("read more", "node/$node->nid"); ?></p> <?php endif; ?><?php endif; ?>
So far, this snippet seems to be working on my Drupal 6 install running on PHP 5. I placed this snippet in my node-blog.tpl.php file right after <?php print $content ?> tag.
Until the Read More Tweak module is ready for Drupal 6, I'm going to have make this work.
Comments
Seem alright
It seems alright to me.
I would have used a class for the container of the link to make it easier to theme through CSS later.
I would have also used a div instead a p.
Read More link module is ready
@jeeves: I took over development of the Read More link module a month or so ago. It's been ready for 6.x for some time. Please check out the 6.x-5.0-RC1 release candidate -- I think it will suit your needs nicely.
Todd Ross Nienkerk
CEO, Owner, and Co-Founder
Four Kitchens: Websites made with love. For good.