Posted by tweaker on January 2, 2007 at 1:49am
Jump to:
| Project: | Foundation |
| Version: | 4.7.x-1.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (won't fix) |
Issue Summary
Rokerr,
I like what your thoughts are with this Theme.
I'm thinking about making it my base theme for sites.
I just need to make a couple of small changes - and I just can't seem to make them work with this theme.
I'd like the way you display your $terms, but I would like to make one small change to them. I would like to add this snippet in there.
<?php
$vocabularies = taxonomy_get_vocabularies();
foreach($vocabularies as $vocabulary) {
if ($vocabularies) {
$terms = taxonomy_node_get_terms_by_vocabulary($node->nid, $vocabulary->vid);
if ($terms) {
$links = array();
print '<li>' . $vocabulary->name . ': ';
foreach ($terms as $term) {
$links[] = l($term->name, taxonomy_term_path($term), array('rel' => 'tag', 'title' => strip_tags($term->description)));
}
print implode(', ', $links);
print '</li>';
}
}
}
?>generally I just replace the $terms line, but in thsi case its not working
<div class="terms"><?php print $terms; ?></div>I would also like to add a "read more" link at the bottom of each node.
if you don't have the time to help, thats ok ..... I understand :-)
I can pretty much figure the CSS stuff out - its the php stuff that is still confusing me.
best regards,
Jeff
Comments
#1
The terms are just Drupal default, and "read more" links should appear automatically but only if the full content of the node body is longer than the teaser.
I'd like to keep the output of this theme close to core, which is why template.php doesn't actually override anything other than regions. But I'd encourage you to add that snippet to the PHPTemplate handbook.
I'm not sure why your snippet isn't printing out the terms though unless the page is cached or something.