I'm trying to display social icons if user check checkbox in template varribles.
So i made everything I need to display this checkbox on each page (i have 1 template only) in template varribles.
Next i put this code into base.html (i use static files for all chunks and template - this file is BaseTemplate static file)
<?php if ($modx->getTemplateVar(1,'Yes')) { ?>
<a href="#"><img src="assets/templates/default/images/facebook.png" alt="Facebook" style="width: 26px; height: 26px; border: 0; margin-left: 40px;" /></a>
<a href="#"><img src="assets/templates/default/images/twitter.png" alt="Twitter" style="width: 26px; height: 26px; border: 0; margin-left: 10px;" /></a>
<a href="#"><img src="assets/templates/default/images/linkedin.png" alt="LinkedIn" style="width: 25px; height: 25px; border: 0; margin-left: 10px;" /></a><br /><br />
<?php } ?>
Also i tried:
<?php if ($modx->getTemplateVar($social,'Yes')) { ?>
where social is a name of my TV, 1 is id of my TV.
And this is what i get on website:
getTemplateVar($social,'Yes')) { ?>
I though this is because i cant use php in chunks/template file, so i create snippet and put code to check TV is checked into it, but this didnt give me any results.
Here is documentation i read to use TV.
What em i doing wrong? How to use TV in this way, not as a filter while display resource?