Recent Topics

1 Nov 17, 2006 09:54    

Hey,

I'm trying to make my blog titles links to the full blog post - this way people can click the title to see comments or view full blog posting etc.

How's best to go about doing this?

Site: http://www.gemsam.co.uk

2 Nov 17, 2006 10:58

My favorite way is described in a minute. I'll preface it by saying it needs the "chain_link.gif" image in your skins/your_skin/img folder. I'm sure it can be done with the 'folded page' image, but this is what I have so this is what I share.

Find the bit in your skins/your_skin/_main.php file that makes the post title happen and replace it with something very close to this:

<h2 class="bTitle"><?php 
if( $Item->get('url') ) { ?>
	<a href="<?php $Item->permanent_url() ?>" title="<?php echo T_('Permanent link to full entry') ?>"><img src="img/chain_link.gif" alt="<?php echo T_('Permalink') ?>" width="14" height="14" border="0" class="middle" /></a>
	<?php 
	$Item->title();
	} else { ?>
	<a href="<?php $Item->permanent_url() ?>" title="<?php echo T_('Permanent link to full entry') ?>"><?php $Item->title( '', '', false ); ?></a>
	<?php } ?>
</h2>

You might have <h3 class="foo"> for your post title, so work that out as need be. After skin-specific details like that, you'll end up with a link to the full article only if you did not provide a URL when you posted. If your post has a URL then you'll have a chain link image preceding the post title.

Groovy eh? Hope so, as I dig on groovy stuff ;)

3 Nov 17, 2006 12:32

Groovy indeed my friend, much appreciated!

4 Jul 30, 2007 05:50

Indeed, Groovy :) I'm not sure where the img comes into play but following the directions I now have my titles linked too.


Form is loading...