V
V
viktorross2019-02-05 06:56:33
HTML
viktorross, 2019-02-05 06:56:33

How to get url from smarty?

Hello, can you please tell me how to get smarty url out of the tag

<img src="https://api.qrserver.com/v1/create-qr-code/?size=70x70&data={$details_url}"/>

The {$detals_url} tag contains a link to the current page, but it is not displayed.
Although, for example, in this script that goes on the same page, everything is displayed perfectly
<script type="text/javascript">(function() {
  if (window.pluso)if (typeof window.pluso.start == "function") return;
  if (window.ifpluso==undefined) { window.ifpluso = 1;
    var d = document, s = d.createElement('script'), g = 'getElementsByTagName';
    s.type = 'text/javascript'; s.charset='UTF-8'; s.async = true;
    s.src = ('https:' == window.location.protocol ? 'https' : 'http')  + '://share.pluso.ru/pluso-like.js';
    var h=d[g]('body')[0];
    h.appendChild(s);
  }})();
  var pluso_div = querySelector('div.pluso');
pluso_div.setAttribute('data-url', '{$details_url}', 'data-title', '{$listing.title}');
</script>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Alekseev, 2019-02-05
@shure348

and what is displayed instead of a variable?
if {$details_url} then see if the code is wrapped in {literal}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question