Embedding Yandex.Market widgets
To place Yandex.Market widgets on a Turbo page:
- Generate the widget code. For more information, see Yandex.Market widgets in the Yandex.Market Help.Attention. Turbo pages don't support the searchSelector and searchImageSelector parameters.
- Add the generated code to the <![CDATA[]]> section inside the turbo:content element.
- To insert multiple widgets on a single page, add the desired number of script blocks. The method described in Inserting widgets into a site doesn't work.
<turbo:content> <![CDATA[ ... <script type="text/javascript"> (function (w) { function start() { w.removeEventListener("YaMarketAffiliateLoad", start); w.YaMarketAffiliate.createWidget({ containerId: "marketWidget1", type: "offers", params: { clid: 2310490, searchText: "Яндекс.Станция", themeId: 2 } }); } w.YaMarketAffiliate ? start() : w.addEventListener("YaMarketAffiliateLoad", start); })(window); </script> ... ]]> </turbo:content>
Copied to clipboard