Another V3 feature available today!

8 months 3 weeks ago - 8 months 3 weeks ago #236 by Dom Cassone (dcassone)
Add default values to shortcodes

As you might know, you can use JoomFuse Short Codes to insert any mapped field into your Joomla website pages. But what happens if that field is empty? Before, without doing much work, you got a funky page with a blank where there should be data.

Not anymore! We've implemented a first release of adding default values to short codes. Simply insert the short code by clicking the JoomFuse Short code button in the editor and chose the field you want to use. Then position your cursor to the left of the closing brace, type space then the word you want for the default value and if you want, another space and the word you want for visitors to see (if it is a public page and different than the default). It would look like this:

No default: (brace)JoomFuse SomeField(brace)
Default value: (brace)JoomFuse SomeField defaultValue(brace)
Default and different Visitor value: (brace)JoomFuse SomeField defaultValue visitorValue(brace)

For example, say you wanted to personalize a page with the member's first name. You might enter this:

Hi (brace)JoomFuse FirstName Member Friend(brace),

If the member has a first name in Infusionsoft, it will be displayed like Hi Joe, but if the member is logged in and does not have a first name recorded, the page will say Hi Member,. Lastly, if they are not logged in, the page will say, Hi Friend,.

Currently the values are limited to one word with no spaces. In V3, you will be able to have default phrases. Also, we will make it easier to add the default and visitor values.

* (brace) means either { or }. I can't put them in or JoomFuse tries to fill in the short code. :)

Let us know what you think!
Last edit: 8 months 3 weeks ago by Dom Cassone (dcassone). Reason: clarify

Please Log in to join the conversation.

Time to create page: 0.833 seconds

Connect with us

JoomFuse Forum
Joomla Community Magazine

© Copyright 2013-2019 Zacaw Enterprises Inc. All rights reserved.
JoomFuse is not affiliated with or endorsed by or Open Source Matters. Logos are copyright by the respective companies and used with permission.

Comodo Secure SSL
Infusionsoft Certified Consultant and Partner Infusionsoft Certified Developer