The <v=> Tag - May 18, 2009

Vae’s shortcut tags are well documented in our Documentation and Integration Center, but we’d like to take a moment to remind you just how useful the <v=path> tag can be. While the tag can be used anywhere in your HTML/XML, it’s used most often to insert content into a tag’s attribute. This property of the shortcut tags makes it possible to solve many problems that traditional CMS platforms do not address.

One example of this is injecting Vae content into a Lightbox image viewer. Lightbox is one of the many JavaScript libraries that make it possible to view your pictures in pretty modal popups. Once you have the Lightbox JavaScript libraries included in your document, the code to display a picture with Lightbox looks like this:

<a href="image.jpg" title="my caption"><img src="image_small.jpg" /></a>

With’s Vae’s shortcut tag, we can easily insert the path to an image that is managed by Vae. Here’s what it might look like:

<a href="<v=picture>" title="<v=caption>"><v:img path="picture" width="50" height="50" /></a>

No problem! Vae’s shortcut tags can make your life easier, so it’s worth reading up on them. If you want the full list of capabilities (like accessing Permlinks or injecting PHP), see the shortcut tags' documentation page.