HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Changing how news/blogs are displayed

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#100813 (In Topic #19783)
Avatar

Fan in action

Well, I'm themeing my main news/blog display.

I've ran into a couple of things. I need to generate a shorter summary (the auto generated and the user submitted) and I can't have any images in the displayed summary.

Ideas?


Last edit: by Valkyrie
Back to the top
 
Posted
Item has a rating of 5 (Liked by FletchLiked by Jean)  
Rating:
#100846
Avatar

Fan in action

Ok, figured out how to do thanks to some help from someone much smarter than me.

In themes/YOURTHEME/templates_custom/NEWS_BOX.tpl on line 55, change

{+START,IF,{TRUNCATE}}{$TRUNCATE_LEFT,{NEWS},400,0,1,0,0.4}{+END}

to

{+START,IF,{TRUNCATE}}{$REPLACE,&nbsp,,{$TRIM,{$STRIP_TAGS,{$TRUNCATE_LEFT,{NEWS},400,0,1,0,0.4}}}}{+END}

That will get rid of any trailing spaces and non breaking spaces, and strips all html tags.

That did the job for me. :thumbs:

Back to the top
 
Posted
Rating:
#100898
Avatar

Community saint

Nice! Thanks for sharing back your solution!
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: