Hi guys
Using getResources, I have a grid of company logos on a page.
Some of the logos link a company website while some link to a MODX resource.
The link address itself is determined by a TV. This TV has its Input Type set to URL.
What I'm trying to do is create an output modifier which makes the logo automatically link to a MODX resource if no URL is manually input into the URL TV.
The code in my chunk is as follows:
[[+tv.URL:empty=`<a href="[[~[[+id]]]]"><img src="[[+tv.Picture:phpthumbof=`w=180`]]"></a>`:else=`<a href="[[+tv.URL]]"><img src="[[+tv.Picture:phpthumbof=`w=180`]]"></a>`]]
It works apart from the URL address. You can see below that if I don't specify a URL, the HREF remains blank.
What I want is the logo to link to the MODX resource connected to the thumbnail.
<a href="http://"><img src="/assets/logo-partner-virgin.png"></a>