I am new to modx, so please forgive me if I sound like a newbie, ’cause I am!
I’ll be using modx to put a magazine online. (I already put them online, but in a fairly static (although database driven) way.
Each month I update their homepage, and put 3 featured articles online.
The articles have several pictures with captions. (the number of images always varies)
So, tell me if I did this right.
I created several new template variables.
image1
caption1
image2
caption2
and so on... these variables are accessible to my template.
First of all... is this the best way to do it, or should I simply use the TinyMice editor to upload pics?
Secondly, if this is ok, how would I display the image/captions, WITHIN the
content (not the template) conditionally? (i.e.... if the image exists... display it, otherwise display nothing?)
I would like to do this...
here is some text, and more text...
if image1 exists, display image1
if caption1 exists, display caption1
here is some text, and more text... etc.
I read in an earlier post about using [[Condimage1]] but I can’t seem to get that to work
within the content of a page, so I am assuming that only works in the template.
Sorry this is so long winded... I would appreciate any help on this!
Thanks!