1 Reply Latest reply on Jan 21, 2015 8:28 PM by urvashi

    How can we add custon meta tags to Cloud and custom code to get some information from Jive as values for the custom meta tags ?

    dcarreno

      Hi.

       

      In order to improve our Search Engine optimization when including Jive content, we need to add some meta tags that are used by the search engine. 

       

      We used to have Jive installed On-Prem, so, we added a custom code in  /template/decorator/default/header-meta.ftl  to include the required meta tags, but now that we moved to Cloud, we don't know how to do that.

       

      This is an example of the code we had in our On-Prem instance:

       

      <#if (document?exists && !action.doSaveDraft?exists)>
        <#assign metaContentType = "Document">
        <#assign metaDescription = "${document.subject} - ${action.renderToText(document)}">    
        <#assign metaCreateDate=document.creationDate?string("yyyy-MM-dd'T'HH:mm:ss")>
        <#assign metaModifyDate=document.modificationDate?string("yyyy-MM-dd'T'HH:mm:ss")>
      <#elseif (thread?exists)>
        <#assign metaContentType = "ForumThread">
        <#assign metaDescription="${thread.name?xml}">
        <#assign metaCreateDate=thread.creationDate?string("yyyy-MM-dd'T'HH:mm:ss")>
        <#assign metaModifyDate=thread.modificationDate?string("yyyy-MM-dd'T'HH:mm:ss")>
      <#elseif (blog?exists)>
        <#assign metaContentType = "Blog">
        <#assign metaDescription="${blog.description!''}">
        <#if (blogPost?exists)>
        <#assign metaDescription="${action.renderToText(blogPost)}">
        <#if (blogPost.creationDate?exists)>
        <#assign metaCreateDate=blogPost.creationDate?string("yyyy-MM-dd'T'HH:mm:ss")>
        <#assign metaModifyDate=blogPost.modificationDate?string("yyyy-MM-dd'T'HH:mm:ss")>
        </#if>
        </#if>
      </#if>
      
      
      <#if (metaCreateDate?exists)>
        <meta name="Date" scheme="iso8601" content="${metaCreateDate}">
      </#if>
      <#if (metaModifyDate?exists)>
        <meta name="UpdateDate" scheme="iso8601" content="${metaModifyDate}">
      </#if>
      <#if (metaContentType?exists)>
        <meta name="DocType" content="${metaContentType}">
      </#if>
      

       

       

      When looking in to the system (Cloud), I tried adding a simple meta tag into the Header HTML section in the Advance option for Theming but it didn't work.

       

      Do you know how we can achieve this?  . Where could we add custom code that applies to all pages?.  How can I get data like I used to do in FTL (e.g <#if (document?exists && !action.doSaveDraft?exists) ?

       

      Thanks!