Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Meta description from article in repeater View modes: 
User avatar
Member
Member
d.farina-reply - 6/14/2011 4:24:05 AM
   
Meta description from article in repeater
in myPage I want to use ,for meta description
,the first 160 chars of my articles published in the repeater that is in my masterpage and that loads the articles in a specific path.
can i do this using macro expression?
for example :
in another page there is an editable region,where i get the text using this macro expression:

{%LimitLength(StripTags(CMSContext.CurrentDocument.DocumentContent), "160")%}

Thanks in advance for your help
Daniele

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 6/16/2011 6:33:40 AM
   
RE:Meta description from article in repeater
Hi,

you could create a custom macro and select requested content using API. Then you could select documents displayed by repeater using SelectNodes method. In this method is a selectOnlyPublished parameter so you could select only published document and create meta description according to published content.

Best regards,
Ivana Tomanickova