Dynamic variables | |
The dynamic variable feature allows you to add some content once, assigning it to a variable, and then you can use it dynamically throughout all your Tiki site by calling the variable name surrounded by percentage characters (%). Like this: Copy to clipboard
So to use, just click on the text in the box below (you need to be logged in): 2850 The permission This can be useful for contact name, phone number, etc. to be used throughout a Tiki site. If you have a multilingual Tiki, you can use dynamic variables for strings of text which are the same in all languages. This feature is different than Dynamic Content. |
1.1.1. Usage | |
(1) Create a new variable, by calling it Copy to clipboard
This will show the text: NaV ![]() (2) Click on the Nav link ![]() Then you can add the content for that dynamic variable. Click on the update variable link, and you are done. |
1.1.2. Limitations | |
If you create a variable containing some code which produces something "invisible", you cannot edit it later then because there's nothing to click and no admin GUI to administer them later. If you want to edit those dynamic variables, you will have to edit them directly in the database table tiki_dynamic_variables where they are stored. |
1.1.3. Examples | |
Example 1Example: You can create a new variable called: Copy to clipboard
Then add this as content: Copy to clipboard This way, you can just write %clear% after each paragraph where you want to ensure that the previous image doesn't overlap with the following headings, etc. For example: In the following example "2.1. First section 2.2 Second section 2.3. Third section" please do not mind the pictures, but mind the position of the text above and besides the pictures: 1.1.3.1. First section1.1.3.2. Second section1.1.3.3. Third section
see the Code
Copy to clipboard
This variable will be "invisible" on the actual wiki page. Example 2You can create "custom syntax", e.g. for the "big" HTML tag: Copy to clipboard
Result: Example 3Similarly for the "small" HTML tag: Copy to clipboard
Result: |
1.1.4. Usage notes | |
1. Only lowercase letters, numbers and underscores appear to work in variable names Copy to clipboard
2. Some wiki syntax works within the variable content (like ((wiki links))) and some does not (like %%% embedded newlines) 3. Some html content works Copy to clipboard
4. Here is a sample SQL UPDATE script for a dynamic variable that contains wiki links: Copy to clipboard
|
Some Dynamic Variables Used on This Site | ||||||||||||||||||||||||
In the following table you can right click and "Inspect" element to see the actual rendered code:
|
Show a list | |
Related | |