Results 1 to 2 of 2

Thread: Opengraph meta tags for image in contao pages

  1. #1
    New user
    Join Date
    08-22-17.
    Posts
    15

    Default Opengraph meta tags for image in contao pages

    I need to display meta tags as html source. For this, I extended the page template fe_page and wrote the meta properties there. I need to have the opengraph meta tag properties. I implemented the following:
    <meta property="og:site_name" content="{{page::rootTitle}}" />
    <meta property="og:title" content="<?= $this->title ?>">
    <meta property="og:url" content="{{env::url}}/{{env::request}}">
    <meta property="og:description" content="<?= $this->description ?>">

    These all works. Now I need to have the property "og:image" for my contao pages. But for contao pages, there is no field present for image upload. Can we have "og:image" meta tag for contao pages. If so, how this can be achieved in my page template fe_page for contao pages?

  2. #2
    User Spooky's Avatar
    Join Date
    01-03-13.
    Posts
    331

    Default

    See my answer to your question here: https://stackoverflow.com/a/47075695/374996

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •