PDA

View Full Version : [CMS] Meta Tags for CMS only


Marv
08-13-2014, 11:10 AM
Hi there,

I have to insert a javascript inside the <head></head> of my sites. So far that works for every page but the CMS. As the CMS is the homepage/starting page, I have to insert a different javascript, that identifies this one as the "homepage" to seperate the function of that javascript from subsites in the forum. In the headinclude template I can make use of

<vb:if condition="$show['threadinfo']">

<vb:elseif condition="$show['foruminfo']" />
<meta name="keywords" content="{vb:raw foruminfo.title_clean}, {vb:raw vboptions.keywords}" />
<meta name="description" content="<vb:if condition="$pagenumber > 1">{vb:rawphrase page_x, {vb:raw pagenumber}}-</vb:if>{vb:raw foruminfo.description_clean}" />
<vb:else />
<meta name="keywords" content="{vb:raw vboptions.keywords}" />
<meta name="description" content="{vb:raw vboptions.description}" />
</vb:if>

to identify, when and which code is loaded for threads or forums.

What I am looking for is something similiar for the CMS. I know that some meta-tags can be inserted through the CMS editor. Though, these meta tags are only for keywords etc so this doesn?t help me to include a javascript for CMS-pages only. Isn?t there something around like a

<vb:if condition="$show[CMS_CONTENT']">

that could be used? I haven?t found anything yet but that doesn?t has to say much. I guess there has to be something like that. Would be glad, someone could point me in that direction.

Anyone an idea?

Scanu
08-14-2014, 08:54 AM
Maybe this is what you're looking for:

<vb:if condition="THIS_SCRIPT == 'vbcms'">
Shown only in cms
</vb:if>

Marv
08-14-2014, 09:33 AM
Thanks for being helpful, Andrea. :up:
Found out about that yesterday, too. Mark at vb.com gave me a hand on that. Sometimes the secret of a riddle lies right in front of you - but your eyes keep ignoring it until someone else sticks his finger into the wound ;)

Scanu
08-14-2014, 09:59 AM
You're welcome :)