inconsistency with the current_tags field

hello,

i am having major inconsistencies with the current_tags field in my collection-template page. in some parts of the code it contains certain values and in other parts it contains nothing at all. i am extremely confused. example given below.

in the image above nothing is printed at first but when I apply a tag through the filter, the first element in the current_tags actually gets printed to the screen.

now in this image, the first element in the current_tags gets printed only once from the block that is within the div block, but the one outside the div block does not print anything, even though the “whatever” header gets printed.

and this is the case for so many parts of the code. what i’ve shown above is just an example. i have no reasonable explanation for the logic behind this result.

so any help would be very much appreciated.

Thank you!

Hi @husseiny ,

First, when you reload the page with the url included with the tag, does it show up at all?

With what you describe, it may fail when you filter, there will be some divs reloaded by ajax, so this div will display the current_tags variable, for those divs that don’t reload it won’t be able to display market.

Hope it helps!

im not sure what you mean by your question. could you please elaborate.

and how do i know which divs get reloaded by ajax and which ones don’t?

Hi @husseiny ,

Please send your site and if your site is password protected, please send me the password. I will check it.

hello,

my site is ColeHaan.kw

Hi @husseiny ,

It will ajax load the following classes:

So if you declare current_tags outside of these divs, it won’t be able to display.

If it helped you solve your issue, please mark it as a solution. Thank you and good luck.

oh okay that makes complete sense.

Thank you very much!