vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   [CMS] Meta Tags for CMS only (https://vborg.vbsupport.ru/showthread.php?t=313669)

Marv 08-13-2014 11:10 AM

[CMS] Meta Tags for CMS only
 
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

Code:

<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

Code:

<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:
Code:

<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 :)


All times are GMT. The time now is 10:50 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04325 seconds
  • Memory Usage 1,715KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete