What are modifiers? - XSitePro Website Design

Home Previous  Next


Brought to you by XSitePro Website Design Software

professional website design made easy      




Modifiers are small modifications to the normal tokens that causes a change in case to the displayed result, i.e. upper, lower, sentence and capital. There is also a modifier that lets you replace spaces with other characters.




lowercase is where all the letters are in lowercase.

Sentence is where the first letter of the first word of a phrase is a capital letter.

Title Is Where The First Letter Of Each Word Is A Capital



There are already four tokens dealing directly with case. These are intended for adjusting the case of a large block of text or even a complete page. For example by starting a section off with {%UPPER and closing it at the end with %} will result in all of the enclosed text being made into upper case.


{%This is some example text%}


would become




This is very useful, but it can be quite cumbersome to use opening and closing tags particular when other tokens are involved. For example if you wanted to make the {%KEYWORD1%} token lowercase you'd have to enter {%LOWER{%KEYWORD1%}%}. To make life easier we've created various modifiers which can be used to modify the case of a token.


:U = Uppercase

:L = Lowercase

:S = Sentence

:T = Title


To use these just add them to the end of the token, prior to the closing %}. For example to make the description all lowercase you'd enter:




or if you wanted it to just have a capital letter at the start of the description you'd enter:





The modifiers are particularly useful for placing items such as headlines on pages.


Headlines in Web pages are usually in what's known as title-case, which means that the first letter of each word is a capital letter. If you were to just use the {%TITLE%} token you might bring in a title that read:


get your office supplies now!


which wouldn't look good at the top of your Web page. To rectify this you would use {%TITLE%:T} and that would result in it being displayed as:


Get Your Office Supplies Now!


which looks much more professional.


By using modifiers you can save yourself a lot of time having to manually go through imported pages to correct the capitalization of certain words.



Space Modifiers


The space modifier is very useful when you want to remove all of the spaces from the results of a token and replace them with something else. To do this you use the :RS modifier. Whatever comes immediately after the letter S is what the space will be changed to.


For example:


:RS+ would change


the best dog in the world








:RS_ would change it to:




Like the case modifier the space modifier is always used at the end of a token. Here are a couple of examples:





Home  Previous  Next