Loading...
 
Features / Usability

Features / Usability


How to make pretty tracker items optional if null?

posts: 3665 United States

Using Tiki6 from trunk with a pretty tracker for display...

How can I have a default value for an empty (null) field in a tracker item? Or better yet, how can I "skip" the empty field?

For example, in my tracker I have an optional field that a users can fill with the URL of their personal blog.

In my pretty tracker template I use:

Copy to clipboard
{img src=img/wiki_up/blog_icon.png link="{$f_1}"}


This works great (gives me a stylized icon for the user's blog link) when the user has a blog. But since the tracker field is optional, some users don't a blog. In that case, I'd like to skip that entire section of the pretty tracker.

In psuedo-code, I want something like this:

Copy to clipboard
if ($f_1 != "") the ( {img src=img/wiki_up/blog_icon.png link="{$f_1}"} ) else ( No blog )


How would I achieve this result with Tiki's pretty trackers?

-R