Using Text Labels with Percentage Shortcode
In this article you are going to learn more about the text Labels, these are variables that appear between percent signs (%) and are pre-processed before being outputted to the web page.
Brilliant Directories offers several ways of customizing how they will look on the page:
Single Percent Sign:
Example: %website_name%
For this examples we will use the website_name variable with the value brilliant directories website
If we use a single percent sign like this:
We would get the following on the homepage
In this example, notice that all letters are lower case.
Single Percent Sign + First Capital Letter
Example: %Website_name%
If we use a single percent sign with the first letter of the variable capitalized like this:
We would get the following:
Notice that the first letter for all words is now capitalized.
Double Percent Sign
Example: %%website_name%%
If we use a double percent sign like this:
We would get the following:
Notice that the words are now plural
Double Percent Sign + First Capital Letter
Example: %%Website_name%%
If we use a double percent sign with the first letter of the variable capitalized like this:
We would get the following:
Triple Percent Sign
Lastly there is the triple percent sign, which just means that any value stored in the Text Labels will be printed EXACTLY like it is. Capital letters will remain capital letters, lower case will remain lower case and so on.
Notice that all words are capitalized and plural. You can find most of this variables in the Text Labels section of your Backend Admin. Simply going to Settings -> Text Labels and you will see their Variable Name in the variable option.
PostFix Variable Parameters
With the mentioned information above, you can also extend the functionality of the distinct Text Label formats by postfixing them with the following variable parameters:
The methods can be used when calling any "%variable_name%" in the system. The way to call a method is the following: %variable~method%. All the regular functionality of the variables like double or triple "%" signs is still available when using methods.
~ao - It is meant for admins and when used with a Text Label it will pre-process the variable in the frontend but not for admins. To use it change the variable from %variable% to %variable~ao% (~ao is postfixed to it)
~as - It is used to add the apostrophe for the possession of nouns. So by using %variable~as% you would change a value of women to women's
~na - It is used to show the variable in plain text (not pre-processed). So using %variable~na% will show %variable% instead of the actual value.
~ut - It is used for special cases where we use URL like text (eg: Slashes). When we use %variable~ut%, it will still pre-process the variable, but in addition to this, it will also remove any special characters for the URL format.
Special Note regarding Text Labels
With the following information about Text Labels set, there is another point that needs to be made regarding Text Labels. You will need to avoid naming a Text Labels the same as a column on the database. For example, the following is a list of columns names found in the database that you should not use as Text Labels:
type, old_filename, new_filename, updated_by, name, icon, keywords, order, group_name, database, first_name, last_name, email, company, phone_number, fax_number, address1, address2, zip_code, zip, state_code, country_code, state_ln, country_ln, website, twitter, facebook, linkedin, blog, active, token, position, profession, additional, link, link_order, user_id, comments, data_name, data_type, form, form_name, search_results, h1, h2, post_type, widget, widget_name, status, title, section, filename, quote, experience, affiliation, awards, published, education, softwares, fees, about_me, featured, testimonial, preferred, work_experience, rep_matters, speaking_engagements, current_position, additional_fields, lat, lon, post_title, post_caption, post_category, post_image, post_price, post_tags, group_category, property_status, property_type, property_beds, property_baths, property_price
This is because they will have a conflict between each other.