Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
Hi guys,

Im new to couch and i tried finding a solution in the documentation and in the search but i cant seem to find it. perhaps the wrong search criteria if so my bad.

My problem is as followed:
I got the blog working, but I want the most recent blog article on my homepage.
I managed to do that like the usual way: cms:show blog_content from the masterpage etc.
but since my blog posts are big and the space on my homepage small I need to limit the characters displayed.

I tried the maxlength atribute like this: cms:show blog_content maxlength='40' />

but this doesnt work although i seemed like the most logical thing (to me).

how can I limit the characters or length of the post on my homepage?

Thanks in advance,

Fallrach
Hello and welcome, fallrach :)

We can use cms:excerpt or cms:excerptHTML tags to show only a portion of posts e.g.
Code: Select all
<cms:excerpt count='40'>
    <cms:show blog_content />
</cms:excerpt>

Please see the docs if you need more details on these tags -
http://www.couchcms.com/docs/tags-refer ... cerpt.html
http://www.couchcms.com/docs/tags-refer ... thtml.html

Hope this helps.
Oh wow, I completely overlooked that part in the documentation.
it's working like a charm.

Thanks alot,
Fallrach
3 posts Page 1 of 1