Home‎ > ‎

Getting Started

NOTE: This guide assumes you already downloaded and installed latest version from our website. If you don't have it, please download My Tokens trial and install as any other module from Host>Module Definition or Host>Extensions.

There is also a My Tokens video tutorial by Aderson Oliveira that shows how to get started and create your first simple token that answers a real common problem in content management.

Instantiate My Tokens Management Module


This modules offers access to My Tokens Studio which is the management console for everything related to tokens.

To instantiate My Tokens management module:
  1. Login as user with admin rights
  2. Go to the page where you want to add the module
  3. Select avt.MyTokens from the dropdown list of available modules in the Control Panel and click Add

When you instantiate the module you be presented with various option to access My Tokens Studio. The first option is a direct link to My Tokens Studio. Second option will install a button under Admin menu so the module will no longer be necessary and can be removed.

Create New Token


Now, it's time to create a token. The simplest token type My Tokens support is the Constant Token.

To create a new constant token:
  1. Navigate to My Tokens Studio
  2. Create a new Namespace. A namespace is a container for grouping tokens by arbitrary criteria.
  3. After token is created, its property pages will automatically open in a new tab
  4. Click New Token to start the token creation wizard
  5. In first step, provide a name and optionally a description; make sure the Constant String is selected in the Token Source dropdown
  6. Second page of the wizard is token specific. For the constant token, you need to input the string which will appear in the Html module when token replacement happens. Note that the string can contain other tokens (thus making it not so constant). Leave the parser set to No Parser and click Next.
  7. Last wizard page allows customizing the parser; since we've selected No Parser, the only option we have is to specify if My Tokens should recursively replace tokens.
  8. When done, click Save. The new token is created and ready to use.

Using the Token in Html module


  1. To make sure token replacement will run, go into module settings; at the end there is a section called Html Module Settings (or something like this). Make sure the Replace Tokens checkbox is checked, the Save your settings.

  2. Click Edit Text to start editing content and use the token

  3. In the text editor, type your text as you normally would, then insert the token in the place where you want to appear. In our example above, you would insert [MyNamespace:MyToken].

    Sometimes you need to make sure there is no HTML formatting breaking your token into many pieces. To check this, go into Html mode (in different editors it may be called differently, but basically it shows the Html code of the text you've typed in). Locate the token and make sure that are not HTML tags inside [MyNamespace:MyToken] string.

  4. Save the content. The Html module should now display the string you've associated with the token.

Next Steps


You will want to experiment with the rest of token types, to get a feeling of the unlimited possibilities My Tokens offers. Navigate through the rest of the documentation pages to read more about each type.