We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10839
    • 51 Posts
    Quote from: bunk58 at Sep 25, 2008, 08:57 AM

    [...]
        [*image:isnot=``:then=`<img class="imgmain" src="[*image*]" alt="[*title*]" width="500" />`*]	
    [...]


    I like those conditional tags. It is part of the flexibility of MODx.

    However, in this case, I think you can get the same effect by associating the "[*image*]" template variable with an "Image" input type.

    If you assign "Image" input type to the "[*image*]" template variable, and you include "[*image*]" in the HTML code of your web page, then if [*image*] is empty, it will be shown as "" (NOTHING) in your web page; if not, it will be shown as "<img src=’...’>".

    It is just a little piece of knowledge I wanted to share with you.
      GinerBosk smiley

      If you can dream it, you can do it.
      • 4310
      • 2,310 Posts
      Good point GingerBosk.
      In this case the image TV is not set to to the type "image" so as stop the client uploading/changing.
      It is populated with an image using another bit of code.