What are Tokens? - XSitePro Website Design

Home Previous  Next


Brought to you by XSitePro Website Design Software

professional website design made easy      




Tokens are simply tags that are replaced by appropriate information whenever you create or publish the page that contains the tag.


This may sound complicated, but it's actually very simple. Let me explain it with an example.


Each page on your Web site has a title that you gave it at the time you created the page. You can find out the title by going to the Info tab. The title appears in the top left hand corner.





Imagine you wanted that page title to appear in a sentence at the top of each page. For example:


You are currently viewing the 1 and 2 bed basic cabins page.


To do this manually would take a considerable amount of time, depending on how many pages you had in your site. If you just have a dozen pages it would be easy enough to do it manually, but if you were in the process of importing 300 pages it would become a huge task that could take several hours to do by hand.


Here's how you'd do it using tokens. It's really easy. Just using the following:


You are currently viewing the {%TITLE%} page.


If you were to import pages that contained the above line the token (i.e. {%TITLE%}) would be replaced automatically at the time of the import with the actually title of the page. So if you imported a page with the title Houses for Sale it would read:


You are currently viewing the Houses for Sale page.


There are lots of tokens to choose from so you can create highly customized pages very easily indeed.


Tokens can be used at any point in a Web page, both in header or the body section of the html.


For example the following html is completely valid.




<title>My Web site page about {%KEYWORD1%}</title>

<meta NAME="Keywords" Content="magic,conjuring,magic hat">



<H2>Everything you want to know about {%PROJECT TITLE%}</H2>

Home  Previous  Next