1 capnrob Jun 23, 2009 00:42
3 capnrob Jun 23, 2009 20:21
Well , the advantage would be not having to do the link, title and alt attribs every time to achieve the same result....
my page is mainly a linkblog - so I do 200 plus links a month ...
Up for any suggestions.....
4 yabba Jun 23, 2009 21:18
/**
* Template function: Display link to item related url.
*
* By default the link is displayed as a link.
* Optionally some smart stuff may happen.
*/
function url_link( $params = array() )
{
global $rsc_url;
if( empty( $this->url ) )
{
return;
}
// Make sure we are not missing any param:
$params = array_merge( array(
'before' => ' ',
'after' => ' ',
'text_template' => '$url$',
'url_template' => '$url$',
'target' => '',
'format' => 'htmlbody',
'podcast' => '#', // handle as podcast. # means depending on post type
'before_podplayer' => '<div class="podplayer">',
'after_podplayer' => '</div>',
), $params );
chances are that you could play with the params in your skin ;)
// URL link, if the post has one:
$Item->url_link( array(
'before' => $params['before_url_link'],
'after' => $params['after_url_link'],
'text_template' => '$url$',
'url_template' => '$url$',
'target' => '',
'podcast' => '#', // auto display mp3 player if post type is podcast (=> false, to disable)
) );
¥
i recommend not using the "link to url", unless there's some advantage to it that i've been missing.
just put the link in the body of the post and make it say whatever you want using the link button.