I'm installed Umbraco 4.03 a couple of days ago. How can I make the classic read more link, like news articles in other CMS (for example like in joomla)?
this is a snippet i used to list some news teaser text on the news home page...
i have my headline, the h4 tag with a link around it... you can duplicate this logic after the concat statment if you want.
so, first i am setting a variable of shortext equal to a truncated version of my main text area [bodyText]--which i am truncating to a length of 250 characters.
then i am outputting that truncated version-- the xsl value statment
now, if the value of bodyText was longer than my original truncation amount it will do a concat operation to add a dot,dot,dot to the end... and ALSO a closing paragraph tag :) now, i am gambling that it isn;t truncating in teh middle of a tag, but hey, i am willing to make that gamble to close out the opening paragraph tag.
so, if you wanted to... you could duplicate the h4 stuff i have, but make the text between the <a> tags read as Read More... llike this.
If you're using a read text editor you could add the read more link within it without having to define a macro for this purpose only.
You should probably also consider using a sentence for the read more link, which makes more sense than just the "Read more text"...Read more about what? It does not always make sense unless you have a visual context, which the Google bot does not have for instance or a visually impaired person. Oh well that was just a site note :)
"Read More.... " link
Hi there,
I'm installed Umbraco 4.03 a couple of days ago. How can I make the classic read more link, like news articles in other CMS (for example like in joomla)?
Any suggestion are appreciated.
Alessandro
Alessandro,
here is an example of some xslt i have written, with some explaining that you can use to expand...
first the code
now some explaining :)
this is a snippet i used to list some news teaser text on the news home page...
i have my headline, the h4 tag with a link around it... you can duplicate this logic after the concat statment if you want.
so, first i am setting a variable of shortext equal to a truncated version of my main text area [bodyText]--which i am truncating to a length of 250 characters.
then i am outputting that truncated version-- the xsl value statment
now, if the value of bodyText was longer than my original truncation amount it will do a concat operation to add a dot,dot,dot to the end... and ALSO a closing paragraph tag :) now, i am gambling that it isn;t truncating in teh middle of a tag, but hey, i am willing to make that gamble to close out the opening paragraph tag.
so, if you wanted to... you could duplicate the h4 stuff i have, but make the text between the <a> tags read as Read More... llike this.
hopefullly that gets you a start toward what you are wanting to do.
Bob,
many thanks for your rapid reply.
Let me try and see if I understood.:)
Hi
I don't understand how can I add Read More... link!
I have to create a macro then when I create an article how I can I use this macro?
Sina
Hi Sina and welcome to our :)
What is your scenario?
If you're using a read text editor you could add the read more link within it without having to define a macro for this purpose only.
You should probably also consider using a sentence for the read more link, which makes more sense than just the "Read more text"...Read more about what? It does not always make sense unless you have a visual context, which the Google bot does not have for instance or a visually impaired person. Oh well that was just a site note :)
/Jan
is working on a reply...