I’m getting used to Revolution syntax and still haven’t figured out some of the ways things are done. All I am trying to do, is check if a variable is not empty, in order to use it in some HTML. The variable is of image type. I am storing this code in a chunk which is being called by wayfinder. The second line of the following code seems to fail:
<li[[+wf.id]][[+wf.classes]]>
[[+mainImage:notempty=`<img src="[[+mainImage]]?h=150&zc=1" class="image-right" alt="[[+wf.title]]" height="150" />`]]
<h2><a href="[[+wf.link]]" title="[[+wf.title]]" [[+wf.attributes]]>[[+wf.linktext]]</a></h2>
[[+introText]]
<p><a href="[[+wf.link]]" class="more" title="[[+wf.title]]" [[+wf.attributes]]>Read more ></a></p>
[[+wf.wrapper]]
</li>
MODx:
* v2.0.3
* Snippets ran: wayfinder
* Plugins ran: PHPThumb
Browser/Client:
* Firefox v3.6.10
* Mac OS v10.6.4
How does it fail, exactly? No output ever, or what?
It outputs nothing, as if the variable is empty. Without the conditional wrapped around it however, mainImage returns a value. This leads me to believe the there is an error in the syntax.
-
☆ A M B ☆
- 24,524 Posts
If you want to use that as an "arrow", you should use > instead.