How else done in my case?

Good day, throw the idea.
1 - There is a button
<button type="button" class="btn btn-sunny text-uppercase btn-lg"><a href="[[*URL-DEMO:]]" target="_blank">DEMO</a></button>

How to make if URL is not entered, the button was OFF

2 - There is an image
<img src="[[pthumb? &input=`[[*image]]` &options=`w=400`]]" class="img-fluid" alt="[[+pagetitle]]">


How to do so, if not uploaded image, the image displayed just a different picture (as do "No image")?
March 12th 20 at 08:03
1 answer
March 12th 20 at 08:05
Solution
On the picture I realized so
[[*id:gt=`77`:then=` <img src="[[pthumb? &input=`[[*image]]` &options=`w=400`]]" class="img-fluid" alt="[[+pagetitle]]">`:else=`<a href="[[~1]]"><img class="img-fluid" src="/bootstrap/img/profile.png" style="width: 20%;" alt=""></a>`]]
Link
[[*id:gt=`[[*URL-DEMO]]`:then=`the DOWNLOAD of the DEMO.....`:else=`<a href="[[*URL-DEMO]]" target="_blank">DEMO</a>`]]
- laron_Kihn commented on March 12th 20 at 08:08

Find more questions by tags MODX