2
I use a CMS called uCoz and it has a variable <?$RELATED_ENTRIES$(5)?>
which displays posts related to the page my visitor reading. I would like to put the related lines between the text of the post, but it does not work by CMS system rule, which does not have the root of the scripts open.
The solution I found was to create a <div class="related"></div>
and insert the content that the variable <?$RELATED_ENTRIES$(5)?>
generate using jQuery. But in Javascript double quotes have to put \
(reverse bar) before and the generated code does not have this \
(reverse bar)
The code that the variable generates is like this
<ul class="uRelatedEntries">
<li class="uRelatedEntry"><a href="/link#1">Lorem Ipsum</a></li>
<li class="uRelatedEntry"><a href="/link#2">Lorem Ipsum</a></li>
<li class="uRelatedEntry"><a href="/link#3">Lorem Ipsum</a></li>
</ul>
Only HTML is compact in one line.
If I understand well, you get the HTML you need only it appears on the same line, without being organized in lists?
– Sergio
Can show the code you are currently using?
– Guilherme Bernal
It’s kind of hard to understand, it would really be nice if you put the code you’re using to generate this and how you wanted it to be.
– Maicon Carraro
and what’s your problem?
– Paulo Roberto Rosa
As I understand it, the uCoz replaces the
<?$RELATED_ENTRIES$(5)?>
automatically by the HTML that is in the question. He wants to use this HTML string that uCoz provides using Javascript/jQuery.– J. Bruni
By mentioning the issue of Escaping (need of reverse bar before quotation marks), reveals that this is the problem: how to do the Escaping of a variable that it does not have access to modify (but only to use in your template)?
– J. Bruni
@J.Bruni, I think that when the user explains better we will all have more certainty. For now it is better not to comment too much, or guess. If the matter is not clarified in 24 hours, we vote to close.
– Sergio
@J.Bruni, great. You have already answered. When the question is clarified I vote +1 if you are right. Until then I’m not sure what’s being asked for so I wait before answering.
– Sergio
@J.Bruni: we can chat? Who voted negative did not explain, hence my comment trying to explain why it might have been...
– Sergio
I had the same interpretation of @J.Bruni, even agreeing that the question of space for doubts, but I think that this battle for perfectionism is a bit frivolous. It is right for a user not to be able to formulate his question so well and an answer to be about understanding, I see no reason not to punctuate it.
– Gabriel Gartz