Hello all!
Trying to use the HTML Source window within the Text popup to add a bunch of "href" URLs.
not exactly sure where to add my Arcade 'expression' within the HTML? the URLs are NOT within the attribute table, but I can query out which Features can be given those URLs(hardcoded).
Im just hoping to get a list of Text in the popup that individually have an href URL associated to them.
I have something as simple as this to subset the selected Features-
if($feature.STATE == "Alabama") {
return something something
and a hardcoded HTML test like this, that works-
<p>
<strong>Geoheritage Examples: </strong>
<br>
<a target="_blank" rel="noopener noreferrer" href="https://www.gsa.state.al.us/gsa/geologic/opportunities/">Educational information</a>
</p>
..but I need to use an expression statement somewhere in that HTML for the popup to work correctly and popup the correct URLs.. yes?
thanks!
Solved! Go to Solution.
Yep! I never really understood the real difference between the 'Arcade' window and the 'Text HTML' window? or when to use which? I just started testing within the Text HTML window..
thanks! this is a great example. still unsure how to Return 'several' URL hyperlinks in the popup tho? at this point with the logic I added I am now able to Return ONE of the links in the list. but unsure how to add a stacked list of those returned hyperlinks..?
You could set different variables for the conditions for which the different links should appear and then display them as a new line <p></p> in the Arcade block.
Sticking with the same example I showed earlier, it could look something like this (note that I have a single link hardcoded in the second line, but you could set it up as a var to suit your needs).
Well, I have to say thankyou! a very 'simple' syntax that I noticed in your example scripts that I truly didn't know about? the Backtick. how ive never known about this is beyond me. but I kept getting errors using the standard single quote around my HTML. i noticed your tics looked different, i tried them, and no more errors! " ` " vs " ' "
so, here are a few example lines from my code(in the Arcade window) using those backticks. I was also able to remove all the related expressions, this is the simple code I was hoping to use, but wasn't using the correct "ticks". yikes. Thanks again! @lzk222
*p.s. also using Break<br> instead of Paragraph<p>
* see screenshot output
Great! Looking good. Glad this was helpful. Yes, the backtick is a small thing I should have mentioned. It threw me off as well.
Hi, I was following this thread and wondering about how do you use/pass the arcade expression value into HTML? I tried to use {expression/expr0}, I got both text and type fields. How do I get ONLY text field?
TIA.
Also, I found the Create Arcade content blocks section of this documentation helpful.