Ellen
I'm new here

Search Engine Optimalization

Hello,

For SEO-reasons, we would like to use meta-data (like TITLE, META TITLE and META DESCRIPTION) on all sorts of content. The developers have implemented it in the templates for content-pages, that works nicely.

The issue that seems to be a problem is, using this meta-data in data-sources. We use a lot of data-sources (ex. news, jobvacancies, recepies) that we would Google to show most efficiently, with the information that we can manipulate through meta-data.

What kind of solution do other companies use to accomplish this?

Thanks in advance for any reply.

Ellen van Wettum

(Sorry for mistakes in my english)

2 Replies
hoebbel
Crownpeak employee

If I do understand you correct, you want to use information of one (or all) of the datasets, which are produced by a tabletemplate in one of the bodies, within a meta tag in the pagetemplate.

Let us say, that you want to use the newest value of the column "lastChange" of all datasets in the meta tag date, as long as there are datasets rendered on the actual page.

This here should work:

<meta name="date" content="$CMS_TRIM(level:4)$
    $CMS_IF(#global.multiPageParams.data.isNull)$
        $CMS_VALUE(#global.page.changeDate.format(set_format))$
    $CMS_ELSE$
        $CMS_SET(set_changedate,"01.01.1970".toDate("dd.MM.yyyy"))$
        $CMS_FOR(dataset,#global.pageParams.data)$
            $CMS_IF(dataset.lastChange > set_changedate)$$CMS_SET(set_changedate,dataset.lastChange)$$CMS_END_IF$
        $CMS_END_FOR$
        $CMS_VALUE(set_changedate.format(set_format))$   
    $CMS_END_IF$
$CMS_END_TRIM$"/>

If you want to use the value of the first dataset, you just can get the dataset with

#global.pageParams.data.get(0)

changed two typing errors [wrong variable names) - sorry

Thank you for your reply.

It looks like a good way to handle it. Smiley Happy

0 Kudos