1 cornetchap Sep 23, 2005 18:27
3 edb Nov 11, 2005 23:22
Somewhere in my "everything" skin I offer a method that uses the skin to decide what to link the title to. Basically, if the 'link to url' field is empty it will link to the post, but if that field is not empty it will link to the content of that field. http://forums.b2evolution.net/viewtopic.php?t=5077 is the post that talks about that 'skin'.
The specific code that will decide where to link the title is this:
<?php
/**
* linking the title to the permalink if there is no other url
*/
if( $Item->get('url') ) {
$Item->title();
} else { ?>
<a href="<?php $Item->permalink() ?>" title="<?php echo T_('Permanent link to full entry') ?>"><?php $Item->title( '', '', false ); ?></a>
<?php } ?>
Clearly you have to put it where it belongs and have your tags and classes and whatnots, but the idea is pretty simple and addresses this "bug" at the skin level. Well, I *think* it addresses this issue. I don't use a skin that permalinks the title, so I've only got a bit of tinkering experience with the issue.
While this may make the XHTML validate, adding this fix breaks validation for Atom/RSS/RDF.
(Try the validation buttons in the custom skin)