I am having a problem when using an output modifier to display map only when address is entered.
This is also part of an Articles article. Not sure if there are too many moving parts.
I created a TV called "location", the output option is "googlemap".
In the ArticleTemplate I am using this call "[[*location:notempty=`[[*location]]`]]"
The map shows up fine for an article with an address.
With no address, the page pops up a modal box "not found" with an OK button.
Getting out of the modal, the page shows a gray map box.
The code sent to the page is:
<div class="gmaptv" style="width: 600; height: 400px">
<div class="gmaptv-map" id="tvgmap8" style="width: 600px; height: 400px;"></div>
<br style="clear: both;" /></div>
<script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&key=&hl=en"></script>
<script type="text/javascript" src="/assets/components/googlemapstv/gtv.js"></script>
<script type="text/javascript">
// <![CDATA[
window.onload = function() {GTV.createMap({"class":"gmaptv","zoom":14,"controls":["GLargeMapControl3D","GOverviewMapControl","GMapTypeControl"],"infoWindow":0,"search":0,"labelControl":0,"traffic":0,"customIcon":0,"iconImage":0,"streetview":0,"streetviewHeight":300,"streetviewYa":"5","streetviewPitch":0,"streetviewUserPhotos":0,"ads":0,"adsMaxOnMap":2,"adsPublisher":0,"avoidHighways":0,"modx.renderFile":"\/homepages\/11\/d292516919\/htdocs\/tty\/core\/model\/modx\/processors\/element\/tv\/renders\/web\/output\/googlemap.php","language":"en","directionsWidth":300,"directions":false,"el":"tvgmap8","address":""});}
window.onunload = GUnload;
// ]]>
</script>
The output modifier works for other template variables.
Do I need to wrap the "location" tv in something else?
Why is it still sending code, when the TV is empty?
Thanks
BG66