1
I need to feed a variable the contents of the field "site" of the document pre-selected in a collection "restaurants" in the Firestore, to then provide the hyperlink of the site with the tag <a>. The problem is that the variable x is always empty. Follows part of the code:
<div class="details">
                   <span class="light">●</span>
                   <span data-fir-content="fone"></span>
                   <span class="black">●</span>
                   <span id="site" data-fir-content="site">
</div>
<script>
    var x = db.collection("restaurants").where("site", "==", true).get("site");
    var orderlink = x;
</script>
<a style="font-size:large;align-content:center" href="http://" onclick="location.href = this.href + orderLink; return false;">
    Ir para o Site 
</a>
Thanks for the help @peter! the biggest problem is still that the variable "X" is not being loaded. tested with Alert(x) and always empty. If I use the <span data-Fir-content="site"></span> tag it works ok. If you have a way to feed "X" with span return above you should also solve the problem... data-Fir-content defined in external script to index.html.
– JL Mendonca