A while ago I wrote a post to explain how to create expandable summaries in classic template and layouts. With this trick, you can choose to display an arbitrary amount of text from the beginning of each post, as a teaser for the whole thing. Then users who want to read the rest of the post can click a link to see the full text. This is handy if you have lots of long articles all on one page. Note that you’ll need to have post pages enabled in order to make this feature work.
But there is an issue with the default setup. Unlike WordPress, when you click the “Read More!” link you will be redirected to the individual post page and all contents including the first part you saw before will show again. It is not problem per se, but it will be nicer if you can jump directly to the next part.
The following is what I have done to improve the expandable summaries hack with direct jumping feature.
- First, insert a name anchor in your posts right after the “fullpost” starting tag. I am using the same name of “fullpost” and you can assign any name as you like. So the updated code looks like
<span class="fullpost>
<a name=”fullpost”></a>
This part can actually go in the post template, if you don’t want to have to type it for each post. - Locate the “Read More…” link in your blogger template, and add a position indicator after your individual post URL(in red color).
(for classic templates)
<MainOrArchivePage <a href="<$BlogItemPermalinkURL$>#fullpost">Read more!</a> </MainOrArchivePage>(for layouts)
<b:if cond='data:blog.pageType != "item"'><a expr:href="data:post.url#fullpost">Read more!</a> </b:if> - Save your blogger template and re-publish, then you are don.
If you are not sure what I am talking about, please refer to Blogger Help about How can I create expandable post summaries first.
1 Response to “How to jump directly to the rest of the post when you create expandable summaries in Blogger”