my blog posts have either video or image, never both. video , image both template-variables in modx evolution cms. always, div section (be blank space/area) image show , below div video. want image show provided input template-variable image, , no blank space video div. similarly, when input template variable video, not want blank area/space div image space show.
div image:
<div class="image"> <img src="[*image*]"> </div> div video:
<div class="well"> <video width="400" controls> <source src="[*video*]" type="video/mp4"> <source src="[*video*]" type="video/ogv"> </video> </div> how display div when input image , not show space video div? or how display div when input video , not show space image div? if-then rule?
problem solved using phx , code...
[+phx:if=`[*video*]`:ne=``:then=`<div class="well"> <video controls="" width="400"> <source src="[*video*]" type="video/mp4"> <source src="[*video*]" type="video/ogv"> </video></div>`+] </div>
Comments
Post a Comment