Loading...
 
Reuse some text many places throughout Tiki

Dynamic variable


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:

%variable14%


So To use, just click on the text in the box below (you need to be logged):
Hello Tiki! Testing 3 2 1!


The permission tiki_p_edit_dynvar must be given to the group. On the current site tiki_p_edit_dynvar has been given to anonymous. The box above is just to help you find the text. Dynamic variables can be used in a sentence. For example, ” Hello Tiki! Testing 3 2 1! ” is the current value.

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 variable for strings of text which are the same in all languages.

This feature is different than Dynamic Content

. Usage

(1) Create a new variable, by calling it
%variable15%


This will show the text:
NaV

which indicates that this is “Not a Variable” yet. If you pass the mouse pointer over it, if will say “Click to edit dynamic variable: variable15” as follows:

Image


(2) Click on the Nav link
Image


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 to the database table tiki_dynamic_variables where they are stored.

Example:
You might use dynamic variable to clear the specification to float images over the text through a div plugin call, and without allowing users to write html code on wiki pages.

You can create a new variable called:
%clear%


Then add this as content:
<br class="clear" />


This way, you can just write %clear% after each paragraph where you want to ensure that the previous image don’t overlap with the following heading, etc.


Example:
In the following example “2.1. First section 2.2 Second section 2.3. Third section” please mind not the pictures, but mind the position of the text above and besides the pictures:


1.1.2.1. First section

Image    
This paragraph shows nothing more than a short paragraph, without the %clear% dynamic variable being used at the end, so that the next section overlaps.

1.1.2.2. Second section

Image    
This paragraph shows nothing more than a short paragraph overlapped to the left space from the previous floating image. However, after this paragraph we have added the %clear% dynamic variable, so that the next section don’t overlap.



1.1.2.3. Third section

Image    
This paragraph shows nothing more than a short paragraph, which is not overlapped to the remaining space to the right of the previous floating image, because the %clear% dynamic variable was used above it.



see the Code
!!!!# First section
{DIV(float=>left)}{img src=http://doc.tikiwiki.org/img/wiki_up/tiki3_admin_jquery_00.png width=300 }~hs~~hs~~hs~{DIV}This paragraph shows nothing more than a short paragraph, without the §14fe456b73a99efdbfd92488a0c43461§ dynamic variable being used at the end, so that the next section overlaps.

!!!!# Second section
{DIV(float=>left)}{img src=http://doc.tikiwiki.org/img/wiki_up/tiki3_admin_jquery_00.png width=300 }~hs~~hs~~hs~{DIV}This paragraph shows nothing more than a short paragraph overlapped to the left space from the previous floating image. However, after this paragraph we have added the §9844f233f0062b5794d22694d3ae1808§ dynamic variable, so that the next section don't overlap.
%clear%

!!!!# Third section
{DIV(float=>left)}{img src=http://doc.tikiwiki.org/img/wiki_up/tiki3_admin_jquery_00.png width=300 }~hs~~hs~~hs~{DIV}This paragraph shows nothing more than a short paragraph, which is not overlapped to the remaining space to the right of the previous floating image, because the §c50599fbc003114faf361a7499123ed5§ dynamic variable was used above it.
%clear%





This variablewill be “invisible” on the actual wikipage.
So, if you want to edit the content of this variable afterwards, you need to edit it directly at the mysql table tiki_dynamic_variables.

1.1.3. Usage notes

1. Only lowercase letters, numbers and underscores appear to work in variable names
%Test1%          Does not work
%Test 1%         Does not work
%test%           Works
%test 1%         Does not work
%Test_1%         Does not work
%Test%           Does not work
%test1%          Works
%test_variable%  Works

2. Some wiki syntax works within the variable content (like ((wiki links))) and some do not (like %%% embedded newlines)
3. Some html content works
like <br /> for newlines

4. Here is a sample UPDATE command for a dynamic variable that contains wiki links:
UPDATE tiki_dynamic_variables 
SET data = "<br><h3>Links</h3><br>((Perl Arrays))<br>((Perl Variables))<br>"
WHERE name = "perl_wiki_links"


Dynamic Variables Used on This Site

Variable Name Value Actual Variable
%userguide% &structure=Tiki+User+Guide

{PARAM(name=”structure”)} {ELSE}{redirect page=”{{page}}&structure=Tiki+User+Guide”}{PARAM}

doc.tiki.org


Bootstrap

AdminGuide

UserGuide

Keywords

Keywords serve as “hubs” for navigation within the Tiki documentation. They correspond to development keywords (bug reports and feature requests):

Accessibility (WAI and 508)
Accounting (7.x)
Articles and Submissions
Backlinks
Banners
Batch (6.x)
BigBlueButton audio/video/chat/screensharing (5.x)
Blog
Bookmark
Browser Compatibility
Link Cache
Calendar
Category
Chat
Clean URLs
Comments
Communication Center
Compression (gzip)
Contacts (Address Book)
Contact us
Content Templates
Contribution (2.x)
Cookie
Copyright
Credit (6.x)
Custom Home and Group Home Page
Date and Time
Debugger Console
Directory of hyperlinks
Documentation link from Tiki to doc.tiki.org (Help System)
Docs 8.x
Draw 7.x
Dynamic Content
Dynamic Variable
External Authentication
FAQ
Featured links
File Gallery
Forum
Friendship Network (Community)
Gmap Google maps
Groups
Hotword
HTML Page
i18n (Multilingual, l10n, Babelfish)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
Kaltura video management (4.x)
Karma
Live Support
Login
Logs (system & action)
Look and Feel
Lost edit protection
Mail-in
Map with Mapserver
Menu
Meta Tags
Mobile Tiki and Voice Tiki
Mods
Module
MultiTiki
MyTiki
Newsletter
Notepad
Payment
Performance Speed / Load
Permissions
Platform independence (Linux-Apache, Windows/IIS, Mac, BSD)
Polls
Profiles
Profile Manager
Report
Toolbar
Quiz
Rating
Feeds
Score
Search engine optimization
Search
Search and Replace
Security
Semantic links (3.x)
Shadowbox
Shadow Layers
Share
Shopping cart
Shoutbox
Slideshow
Smiley
Social Networks
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Stats
Surveys
Tags (2.x)
Task
Tell a Friend, alert + Social Bookmarking
TikiTests (2.x)
Theme CSS & Smarty
Trackers
Transitions (5.x)
TRIM
User Administration including registration and banning
User Files
User Menu
Watch
WebHelp
WebDAV (5.x)
Webmail
Web Services
Wiki 3D
Wiki History, page rename, etc
Wiki Page Staging and Approval (2.x)
Wiki Plugin extends basic syntax
Wiki Syntax
Wiki structure (book and table of content)
Workspace
WSOD
WYSIWYCA
WYSIWYG (2.x)
XMLRPC


Tiki Newsletter

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other news!
Contribute to Tiki
Show php error messages