meta property

Options
Is there not an automatic way of adding meta property to your page wrapper?
  • <meta property='og:title' content='Title of the article"/>
  • <meta property='og:image' content='//media.example.com/ 1234567.jpg"/>
  • <meta property='og:description' content='Description that will show in the preview"/>
  • <meta property='og:url' content='//www.example.com/URL of the article" />
I tried using: <meta property='og:title' content='${title}" /> and <meta property='og:title' content='<t:value id="title">title</t:value>"/>

No dice

Any help would be great.  Thanks!
Tagged:

Comments

  • You can dynamically assign value for those meta properties on your page wrapper for example

    <meta property="og:url" content="[[S8]]" />     -- that [[S8]] will return whatever URL of the page the browser is currently displaying to end-user at moment.

    <meta property="og:title" content="[[S24]]" />   -- that [[S24]] will pull the page title of the pagebuilder one is currently at. You define that page title within "Edit Version Attributes" of each of your pagebuilder version.


    You could also put those metas inside of reusable pagebuilder where you would embed that pagebuilder and call it at the "Additional HTML Tags for HEAD Element" section of the pagewrapper  (through S51 tag)  and within that reusable pagebuilder you can wrap those metas in an S-tag if-else conditional. A use case scenario


    <!-- if this is a pagebuilder page type (identified by the returned value of 19, or 23 for the secure counterpart through the S4 tag), grab the page title through S24 tag and make that the value of your meta og:title-->
    [[?x19x23x::x[[S4]]x::
    <meta property="og:title" content="[[S24]]" /> 
    ::]]

    <!-- if this is a non-secure teamraiser page (which would cover entry page, personal, team page..etc) type (identified by the returned value of 27 given through the S4 tag), grab the event name value (since there is no default page title placeholder on entry page) and make that the value of your meta og:title . you can event append the value maybe after that event name you can put some other strings as you wish-->
    [[?x27x::x[[S4]]x::
    <meta property="og:title" content="[[E47:[[S334:fr_id]]:fr_info:1:event_title]]" /> 
    ::]]




    I am not sure about <t>  -- is that a CMS tag? nor the ${title}  -- in case if you are wondering about dynamically feeding that through Javascript (i.e. AngularJS), I would wonder the effectiveness of that in terms of SEO (yes you can modify the value, but this happened at doc ready state and perhaps going to be bit too late compared to when you are using the S-tag which is a server-side that always comes first before everything else.


    regards,

    Daniel
  • Daniel, thank you for providing below but will this work for the CMS?  I'm not using pagebuilder or teamrasier--I should have said CMS wrapper instead of page wrapper. My apologies. 

Categories