Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Blog Module /

Discuss the Blog Module.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

[Solved] Adding "Read more" at the end of the summary


Go to End


3 Posts   1912 Views

Avatar
JensR

Community Member, 8 Posts

30 November 2009 at 12:54pm

Edited: 01/12/2009 1:50am

Hi everyone,

I would like to add the text [read more] as a link to the complete post at the end of the summary (first paragraph) on the main blog page.

Since I know nearly nothing about scripting, I thought I'd ask if someone here has a bit of code that I just can paste in.

Thanks in advance,

Jens

Avatar
Double-A-Ron

Community Member, 607 Posts

30 November 2009 at 11:48pm

Hi Mate,

In /blog/templates/Includes/BlogSummary.ss you will see the standard link there at the bottom:

<a href="$Link" class="readmore" title="Read Full Post">Read the full post</a>

Either duplicate this code and add your own text, or simply edit the "Read the full post" text between the <a> tags.

Aaron

Avatar
JensR

Community Member, 8 Posts

1 December 2009 at 1:50am

Aaron, thanks for your quick answer.

The solution was a lot simpler than this: I found out that the BlogSummary code was correct, but the reference had a type in it...