<script type='text/javascript'>
var memory = 0;
var number = 0;
</script>
Then scroll way down the page until you find the div for the post-body and insert the stuff in bold:
<div class='post-body'>
<b:if cond='data:blog.pageType == "item"'>
<style>span.fullpost{display:inline;}</style>
<p><data:post.body/></p>
<b:else/>
<style>span.fullpost{display:none;}</style>
<p><data:post.body/></p>
<script type='text/javascript'>
var permlink='<data:post.url/>';
var title='<data:post.title/>';
var spans = document.getElementsByTagName('span');
var number = 0;
for(i=0; i <spans.length; i++){
var c = " " + spans[i].className + " ";
if (c.indexOf("fullpost") != -1) {
number++;
}
}
if(number != memory){document.write('<p><a href=' + permlink + '>"'+ title + '" continues...</a></p>') }
memory = number;
</script>
</b:if>
<div style='clear: both;'/> <!-- clear for photos floats -->
The bit in brackets in the document.write statement can be changed if you want it to say something different. Now, when you're writing a post, you just stick the bit you don't want to appear on your front page between <span class="fullpost"> and </span>, and off you go!
Note that I didn't write the original code - I've just (I think) bodged it to work in the new system. Here's another way to do it, from someone who looks like he might know what he's talking about, although for some reason I couldn't get that to work either.
I'll be fiddling with other bits of the template in the next few days, so apologies in advance for when I break the HTML (Update:
No comments:
Post a Comment