Hi all,
This may not be the place for this but I thought I would try.
So I’ve put together quite a long HTML string to display attributes for a map I’m maintaining. The problem is I have not been able to figure out how to format this HTML code to be conditional on if certain fields are populated. Because of this I need to basically have 10 different versions of the same file in my Map each with their own unique pop-up script and updating it all gets laborious.
I have minimal HTML experience, basically no Python experience (automated a JPEG export process once but that was it), and cannot figure this out. I’ll try to post the script as it exists. What I need to figure out is how to write it so if {StartDay10} is empty then only show everything from {StartDay9} and below but if {StartDay9} is empty then only show everything from {StartDay8} and below, and so on…
Problem number 1 is that I don’t know how to post the script to reddit so everyone can see it.
Any help would be incredibly appreciated.
Trail Name: {PathName} Location: {Location} Community: {Community} County: {County} {StartYea_1}: {StartMo10} {StartDay10} - {EndMo10} {EndDay10}
. Volume: {TotalVol10} {StartYear9}: {StartMo9} {StartDay9} - {EndMo9} {EndDay9}
Volume: {TotalVol9} {StartYear8}: {StartMo8} {StartDay8} - {EndMo8} {EndDay8}
Volume: {TotalVol8} {StartYear7}: {StartMo7} {StartDay7} - {EndMo7} {EndDay7}
Volume: {TotalVol7} {StartYear6}: {StartMo6} {StartDay6} - {EndMo6} {EndDay6}
Volume: {TotalVol6} {StartYear5}: {StartMo5} {StartDay5} - {EndMo5} {EndDay5}
Volume: {TotalVol5} {StartYear4}: {StartMo4} {StartDay4} - {EndMo4} {EndDay4}
Volume: {TotalVol4} {StartYear3}: {StartMo3} {StartDay3} - {EndMo3} {EndDay3}
Volume: {TotalVol3} {StartYear2}: {StartMo2} {StartDay2} - {EndMo2} {EndDay2}
Volume: {TotalVol2} {StartYear1}: {StartMo1} {StartDay1} - {EndMo1} {EndDay1}
Volume: {TotalVol1}
submitted by /u/kawiku
[link] [comments]
More Stories
Will County, Illinois 1864 Map – May 20, 2023 at 04:14AM
This kid on Google Map trying to get by – April 27, 2023 at 05:05PM
World of Hyatt: Complete list of all-inclusive properties in Europe (with map) – April 27, 2023 at 04:57PM