Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • stefan 5 posts 26 karma points
    Sep 25, 2015 @ 12:52
    stefan
    0

    Partial View with meta-tags

    Hi,

    Let's suppose I have a page with 10 products, when I click a button on one of the products it opens a pop-up (partial view) which has some share buttons. When I click 'Share on Facebook' it needs to have the correct meta-tags (title of the product, description of the product and image of the product). Is this possible? If so, how?

  • Claushingebjerg 939 posts 2574 karma points
    Sep 25, 2015 @ 13:58
    Claushingebjerg
    0

    When you say popup, do you mean a physical new window (like target="_blank") with a new document, or an in page javascript modal?

  • stefan 5 posts 26 karma points
    Sep 25, 2015 @ 14:03
    stefan
    0

    I mean like a javascript modal. It can also be a View not necessarily partial.

  • Artyom Chernenko 17 posts 91 karma points
    Sep 28, 2015 @ 04:29
    Artyom Chernenko
    0

    Dynamically change (via JS) meta tags on popup show and revert it back on close?

  • stefan 5 posts 26 karma points
    Sep 28, 2015 @ 05:52
    stefan
    0

    Thanks for your help I made a 2 new views(one from controller one w/o, with umbraco template and document type) on share click I send to facebook the url for the new view which has head and tags. With JS/Ajax and the like it will never ever work, I have tried.

  • Artyom Chernenko 17 posts 91 karma points
    Sep 28, 2015 @ 05:57
    Artyom Chernenko
    0

    Ah understood, FB requests back this page and expects meta tags to be presented. Then yes JS will not work. And your solution seems reasonable.

  • Claushingebjerg 939 posts 2574 karma points
    Sep 28, 2015 @ 06:24
    Claushingebjerg
    0

    As i understand the facebook sharing mechanism, it page based, so you cant "send" info to it. It loads info from the metadata on the page.

    But if you have 10 products on the page, dont you have 10 detail pages about the individual products? Couldn't you share the url of the detail page? and then have the correct metadata on the detail page?

  • stefan 5 posts 26 karma points
    Sep 28, 2015 @ 06:32
    stefan
    1

    This is what I ended up doing.

  • Claushingebjerg 939 posts 2574 karma points
    Sep 28, 2015 @ 06:34
    Claushingebjerg
    0

    Please mark the problem as solved.

Please Sign in or register to post replies

Write your reply to:

Draft