Kingsley |
|
---|---|
I have 2 page fields: {PAGE_AUTHOR} and {PAGE_SOURCE} and I want a small text (None, or No information available) to appear when both fields are empty.
But when one field is filled in, that field must appear, and the text must disappear. I can do it for both fields seperately, but what I can't figure out is how to do that with both fields at once..
Does it make any sense? look at the example below, maybe you'll see what I mean:
<!-- IF {PAGE_AUTHOR} --> <strong class="small">{PHP.L.Author}:</strong> {PAGE_AUTHOR} <hr /> <!-- ELSE --> No information available <!-- ENDIF --> <!-- IF {PAGE_SOURCE} --> <strong class="small">{PAGE_SOURCE_TITLE}:</strong><br /><br /> <div style="font-size:10px;"><a href="{PAGE_SOURCE}" target="_blank">{PAGE_SOURCE}</a></div> <hr /> <!-- ENDIF --> |
GHengeveld |
|
---|---|
<!-- IF {PAGE_AUTHOR} OR {PAGE_SOURCE} --> <!-- IF {PAGE_AUTHOR} --> <strong class="small">{PHP.L.Author}:</strong> {PAGE_AUTHOR} <hr /> <!-- ENDIF --> <!-- IF {PAGE_SOURCE} --> <strong class="small">{PAGE_SOURCE_TITLE}:</strong><br /><br /> <div style="font-size:10px;"><a href="{PAGE_SOURCE}" target="_blank">{PAGE_SOURCE}</a></div> <hr /> <!-- ENDIF --> <!-- ELSE --> No information available <!-- ENDIF --> |
|
This post was edited by Koradhil (2011-08-30 13:38, 13 years ago) |
Kingsley |
|
---|---|
Koradhil, you the man.. |
GHengeveld |
|
---|---|
Nested logic blocks are a relatively new feature, so I'm not surprised you didn't think of it. |
Kingsley |
|
---|---|
I love them man, haven't seen them in any other system so far, and that's their loss. Guess I don't know half of what is possible with it, but it's a very useful option in Cotonti. Is there any documentation on it? I'd love to know more about it |
GHengeveld |
|
---|---|
I'm working on an article that discusses a lot of Cotonti's "hidden features". I think we will release a series of those, since it's a lot of work.
|
Kingsley |
|
---|---|
If you want/need Dutch translation of those docs.. holla.. Added 1 minute later: * slaps himself in the face* you are dutch too, forgot that for a moment.. But the offer stands.. |