Quantcast
Channel: C1 CMS Foundation - Open Source on .NET
Viewing all articles
Browse latest Browse all 2540

New Post: EventsCalendar List Meta Description

$
0
0
Hi!

I assume that you are using the Composite.Lists.EventCalendar.Detail function to switch between list and detail views of events on a dedicated page.
  1. Functions perspective > XSLT Functions
  2. Edit this function.
  3. Right after the variables declarations add two more variables:
<xsl:param name="EventTitle" select="/in:inputs/in:result[@name='GetEventCalendarXml']/EventCalendar[@Id=$DateView]/@Title" />
<xsl:param name="EventDescription" select="/in:inputs/in:result[@name='GetEventCalendarXml']/EventCalendar[@Id=$DateView]/@ShortDescription" />
  1. Within the <head/> element add this markup:
<xsl:if test="$DateView!=''">
  <title><xsl:value-of select="$EventTitle"/></title>
  <meta name="description" content="{$EventDescription}"/> 
</xsl:if>
I took the liberty of customizing the code: using the title of a single event as the title of the page and the event's short description as the page's meta description.

/Vitaly

Viewing all articles
Browse latest Browse all 2540

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>