Meta Tags

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Marv
    Member
    • Jun 2002
    • 82

    [CMS] Meta Tags

    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 my 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, where and which code is loaded for threads or forums.

    What I am looking for is soemthing 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 but that doesn´t say much. I guess there has to be something like that. Would be glad, someone could point me in that direction.


    Regards,
    Marv


    'My world, the one that I live in, that surrounds me, is called insane by some. I can dig that - I feel the same about theirs.'
    (Henry Rollins)
  • Mark.B
    vBulletin Support
    • Feb 2004
    • 24288
    • 6.0.X

    #2
    This is custom coding really, but have you tried:
    Code:
    <vb:if condition="THIS_SCRIPT == 'vbcms'">
    MARK.B
    vBulletin Support
    ------------
    My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
    My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

    Comment

    • Marv
      Member
      • Jun 2002
      • 82

      #3
      Thanks Mark for the head up. I`d already tried 'content' but never looked into the content.php - what I should have done in the first place - and only searched through the templates. Somehow I wasn´t aware until now, that vbcms is available. That even solves another problem, without asking. So this is a double Thank you!
      Regards,
      Marv


      'My world, the one that I live in, that surrounds me, is called insane by some. I can dig that - I feel the same about theirs.'
      (Henry Rollins)

      Comment

      • Mark.B
        vBulletin Support
        • Feb 2004
        • 24288
        • 6.0.X

        #4
        Originally posted by Marv
        Thanks Mark for the head up. I`d already tried 'content' but never looked into the content.php - what I should have done in the first place - and only searched through the templates. Somehow I wasn´t aware until now, that vbcms is available. That even solves another problem, without asking. So this is a double Thank you!
        As a tip...most core vB3 or vB4 files will have a line in them, near the top, define('THIS_SCRIPT', 'vbcms');

        The bit that says vbcms, defines what the script name is and that will work in a THIS_SCRIPT remplate conditional as above.

        So you have things like

        define('THIS_SCRIPT', 'showthread');
        define('THIS_SCRIPT', 'forumdisplay');
        define('THIS_SCRIPT', 'newreply');

        etc
        MARK.B
        vBulletin Support
        ------------
        My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
        My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

        Comment

        • Marv
          Member
          • Jun 2002
          • 82

          #5
          Yes Mark, I should have known this better. I really don´t know, why I haven´t remembered that. Guess I´m to long into template customization the last days and I should gimme a break.
          Whatever.. Thanks for leading a blind, Mark
          Regards,
          Marv


          'My world, the one that I live in, that surrounds me, is called insane by some. I can dig that - I feel the same about theirs.'
          (Henry Rollins)

          Comment

          Related Topics

          Collapse

          Working...