Loading...
 

History: PluginAttributes

Preview of version: 19

Plugin Attributes

Use this wiki plugin, introduced in Tiki6, to assign generic attributes to the current object. Attributes are provided as parameters. For tiki.geo.lat, . Removing the plugin or values in it will not remove the attributes. See Object Attributes and Relations for the available attributes.

Usage

Copy to clipboard
{attributes tiki_geo_lat="" tiki_geo_lon="" tiki_geo_google_zoom="" tiki_relation_target="" tiki_relation_source=""}

Parameters

Assign generic attributes to the current object
Introduced in Tiki 6.
Go to the source code
Preferences required: wikiplugin_attributes

Parameters
no parameters


Examples of using it to set fixed values and use them in a tracker

This method was used in a Tiki12 shop and I retrieved the code

In this use case we want to have fixed/editable values that can be used in different features of Tiki.
There is several advantages;

  • Changing one value will impact many other objects (items, calculation, etc).
  • Editing can be very limited (permissions to edit this page only)
  • Editing can be super relaxed (permissions to edit this page only)
  • It may help to keep fixed values through time (VAT may change from time to time however you need to keep the value for a specific date)


Here some example of plugin attributes in a wiki page and the usage in another place (mainly tracker field)

Using a constant from the pluginAttributes in a tracker field calculation

On the wiki page
Copy to clipboard
{shop_general_handling_fees="0.2}

Calculation in a mathematical field type in a tracker
Copy to clipboard
(mul Price (attribute (object (str wiki page) (str Constants)) (property shop.general.handling.fees)))

Using a constant from the pluginAttributes to return different value in a php file

On the wiki page
Copy to clipboard
{shop_XXA_minimum="499" shop_XXB_minimum="599"}

usage and condition in a php file
Copy to clipboard
// check min amount $shop_constants = TikiLib::lib('attribute')->get_attributes('wiki page', 'Constants'); if ($input->supplierOrderName->int() == TikiLib::symbols()->Supplier['XXA']) { $minimum = $shop_constants[’shop.XXA.minimum']; } else if ($input->supplierOrderName->int() == TikiLib::symbols()->Supplier['XXB']) { $minimum = $shop_constants[’shop.XXB.minimum']; } else { throw new Denied(tr('Unsupported Shop')); }

Using a constant from the pluginAttributes in a Smarty template

On the wiki page
Copy to clipboard
{shop_freeshipping_limit="699"}

Copy to clipboard
<p class="flat_cost">{tr}Shipping{/tr} {if ($cart_total > $shop_constants.shop_freeshipping_limit)}<span class="free_shipping">₪0.00</span>{else}₪{$flat_cost|escape}{/if} {* $prefs.payment_currency|escape *}</p>

Aliases

History

Advanced
Information Version
Bernard Sfez / Tiki Specialist Completing doc, to display a value in a wiki page 27
Marc Laporte 26
Bernard Sfez / Tiki Specialist Adding info about the plugin status (advanced) 25
Bernard Sfez / Tiki Specialist Fixed code in samples 24
Marc Laporte 23
Marc Laporte 22
Marc Laporte 21
Marc Laporte 20
Bernard Sfez / Tiki Specialist Adding example from MFM project 19
Yves Kipondo 18
Marc Laporte Edit restored by rescue script 2017-04-24T18:09:12+00:00 17
lindon 16
lindon 15
lindon 14
lindon 13
lindon 12
Marc Laporte 11
Marc Laporte This is a not a valid value 10
Marc Laporte 9
Marc Laporte Code Plugin modified by editor. 8
Marc Laporte 7
Marc Laporte 6
Marc Laporte 5
lindon 4
lindon 3
Marc Laporte 1

doc.tiki.org

Get Started

Admin Guide User Guide

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
Articles and Submissions
Backlinks
Banners
Batch
BigBlueButton audio/video/chat/screensharing
Blog
Bookmark
Browser Compatibility
Link Cache
Calendar
Category
Chat
Clean URLs
Comments
Communication Center
Compression (gzip)
Contacts (Address Book)
Contact us
Content Templates
Contribution
Cookie
Copyright
Credit
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
Draw
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)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
Kaltura video management
Karma
Live Support
Login
Logs (system & action)
Look and Feel
Mail-in
Map with Mapserver
Menu
Meta Elements
Mobile Tiki and Voice Tiki
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
Shadowbox
Shadow Layers
Share
Shopping cart
Shoutbox
Slideshow
Smiley
Social Networks
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Stats
Surveys
Tags
Task
Tell a Friend, alert + Social Bookmarking
TikiTests
Theme CSS & Smarty
Tiki Manager
Trackers
Transitions
User Administration including registration and banning
User Files
User Menu
Watch
WebDAV
Webmail
Web Services
Wiki History, page rename, etc
Wiki Syntax
Wiki structure (book and table of content)
Workspace
WSOD
WYSIWYCA
WYSIWYG
XMLRPC

Tiki Newsletter

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