HTML Truncate
Limit Characters
New#1: Problem with showing the text
with issues like this, always try starting your xpath from the data node
/data/blog-home/entry/titel /data/blog-home/entry/introtekst
(Can’t edit comment)
Also try
/data/blog-home/entry/introtekst/text()
Have you changed the match attribute of the template from body to introtekst?
I know it’s mentioned in the other post, but just checking.
So far we haven’t resolved if it’s really an issue with the utility (it might be, as the first template matches a node called body
) so posting your problem to the issue tracker might not be the right way to solve it (additionally, nobody will notice the discussion as the issue tracker is still missing a notification feature).
I suggest opening a regular thread on the forum where we can discuss your problem.
I suggest that my discussion will continue inside the first post I’ve placed, because I’ve started that post.
This template assumes that your content is inside a node called "body"
Aside from major changes to the template, you need to change the first template line from
<xsl:template match="body" mode="truncate">
to
<xsl:template match="your-content-name-here" mode="truncate">
Please login to comment.
I’ve tried all of the solutions, but with no result, nothing is showed when I use the
mode="truncate"
.This is my
XML
:And this is my
XSLT
:The
XSLT
above is the one inside myhome.xsl
.I’ve include inside my
home.xsl
themaster.xsl
and inside the master I includetruncate.xsl
.