Forum for discussing general topics related to Couch.
3 posts Page 1 of 1
Hi,

How come my code doesn't respond correctly?
If I change the count, it appears all the time as my input is ignored.
If I set truncate_chars='1' it works on characters but again the amount is ignored (by the default of 50 I assume).

link to docs: http://www.couchcms.com/docs/tags-refer ... cerpt.html

Code: Select all
<div class="tekst">
                     <cms:excerpt allow='i, b, u' count='2O' ignore='img' trail="<br/><a href=\"<cms:show k_page_link />\"> <span class=\"meerNieuws\"><br\/><br\/>lees meer…</span> </a>"><cms:show newsText /></cms:excerpt><br>
                  </div>


Thanks in advance...
Sorry to hear about the problem Divian.

The 'excerpt' tag has no 'ignore' parameter because by default all HTML tags are stripped off unless they are present in the 'allow' parameter. This is equivalent to a whitelist if you know of that concept. Have you tried removing the two backslash "\" characters from the 'br' tags? Are you certain 'newsText' is the correct variable name?
Code: Select all
<cms:excerpt allow='i, b, u' count='2O' trail="<br/><a href=\"<cms:show k_page_link />\"> <span class=\"meerNieuws\"><br/><br/>lees meer…</span> </a>"><cms:show newsText /></cms:excerpt>

The above code worked on my setup so let me know if this resolves the issue.
Thanks cheesyproof.

This code worked out perfectly:
Code: Select all
<cms:excerpt allow='i, b, u' count='30' trail="<br/><a href=\"<cms:show k_page_link />\"> <span class=\"meerNieuws\">lees meer…</span> </a>"><cms:show newsText /></cms:excerpt><br/>
3 posts Page 1 of 1