Answer the question
In order to leave comments, you need to log in
Why doesn't XSL read cookies?
Hello. Actually, the problem is that when reading a cookie, the parameter is always empty. The cookie was recorded using the jquery.cookies plugin.
This is how I write:
$('#popup_city').children('a.button_popup').click(function() {
var elem = $('#popup_city').children('select').children('option:selected');
$('span[rel=#popup_city]').attr('id', elem.attr('value'));
$('span[rel=#popup_city]').text(elem.text());
$.cookie('city', elem.attr('value'), {path: '/'});
return false;
});
<xsl:param name="city"/>
<xsl:template match="result[@module = 'catalog'][@method = 'category']">
<xsl:value-of select="$city"/>
</xsl:template>
Answer the question
In order to leave comments, you need to log in
The ability to retrieve the cookie value during XSLT transformation depends on which XSLT processor is used in the production environment. You can also observe how this issue is addressed differently in products or libraries.
In particular, UM.CMS (tested on version 2.9.7-49344) passes the cookie value to the parameter of the same name when transforming the template.
The trouble may be related to an older version where this behavior is not supported, or some external bug.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question