Truncate Summaries2 users found helpful
Block Page List.
Type of Pages Blog Entry.
In custom template "Blog Index "the Truncate Summaries does not working properly.
Iam setting for example Truncate descriptions after 250 characters and the truncate does not work.
I have set a description of an article of course...
<div class="excerpt"> <?php $a = new Area('Main'); $a->disableControls(); $a->display($cobj); ?> </div>
Maybe modify it to try this.
It looks like the blog_index is set to show the 'Main' Area of the blog page not the page description so I grabbed that in a buffer and cleaned and shortened it. Let me know if it works.
EDIT: updated as per @jjcdesign's comment below.
Fatal error: Call to a member function entities() on a non-object in /home/easynetg/public_html/c5/concrete/blocks/page_list/templates/blog_index.php on line 42
this line of code is:
FYI: I'm not sure if you know this as you are new around here. But the people helping in the forums aren't concrete5 employees, we're just helping out.
It seems to be working properly!
The page type of this page must be only "Blog Entry"? or I can use and another type of page like "Right Sidebar" for example?
From the look of the code, I'm pretty sure it only looks for areas called "Main". So any page that has a "Main" I think it will take the first block from main and spit it out. You might run into trouble if the first block isn't a content block or something like that. I'd would test it out and see what happens. From what I can tell it should work.
Edit: I was in the wrong template folder, but still not working the way I would expect it.
If I use the given code above, just the Titles are showing, but no text content.
Note, mkly corrected/edited his first post so that the code there is now correct, i.e. you need the "echo".