Got asked by a client to add a second URL to a block on a seminar page, but they wanted to add a counter for seminars with two URLs, so the page would show “seminar URL 01” and “seminar URL 02”. I’m pulling json from a db, then using Hugo to build the site, ranging over the json to build the seminar page. I added a field in the db to contain the second URL, and some conditional code to display the counter. The challenge was to add the counter only for seminars with two URLs, but not for those with one. For the first URL I used a with clause, and added the counter only in the case that the second URL was set.