Loading...
 
Skip to main content

History: API Tracker

Preview of version: 6

API Tracker

Tiki supports URL arguments and they can be used to interact with the Trackers and the plugins displaying or creating items. For example you can define a default value for a field in a customSearch or force the insertion of a value when creating an item.

Examples


Allow creation, edition and deletion of tracker items in a modal pop-up


This is the html syntax for use in a smarty template file.

Creation of an item in tracker 1
Copy to clipboard
<a class="click-modal tips" title=":Create new item" data-role="button" data-inline="true" href="tiki-tracker-insert_item?trackerId=1">Create new item</a>
Edition of item 3 in tracker 1
Copy to clipboard
<a class="click-modal tips" title=":Edit item" data-role="button" data-inline="true" href="tiki-tracker-update_item?trackerId=1&itemId=3">Edit item 3</a>
Deletion of item 3 in tracker 1
Copy to clipboard
<a class="click-modal tips" title=":Remove item" data-role="button" data-inline="true" href="tiki-tracker-remove_item?trackerId=1&itemId=3">Remove item 3</a>

Update some fields of an item


If you want to update two fields which permanentNames are name and surname and leave the other fields unchanged:

Edition of two fields of item 3 in tracker 1
Copy to clipboard
tiki-tracker-update_item?trackerId=1&itemId=3&fields~name&fields~surname

(same principle for item creation)

Here we use it to create an item with a specific category Id.
(replace "childrenIdNumber" with your category field permaname)

Copy to clipboard
tiki-tracker-insert_item?trackerId=2&next=tiki-tracker-insert_item%3FtrackerId%3D3&forced~childrenIdNumber=17


This can be used with a variable like a field from a plugin list. Here we prefill the (user)name and hide it.The smarty replace modifier is required to remove extra space(s) added to the value(s)

Copy to clipboard
tiki-tracker-insert_item?trackerId=11&forced~paymentsFamilyName={$row.name|replace:' ':''}

Here we use it to create an item with a specific category Id.
(replace "permaname" with your category field permaname)

Copy to clipboard
tiki-tracker-update_item?trackerId=2&itemId=178&fields~childrenIdNumber=17

Aliases

  • ...

History

Advanced
Information Version
Jean-Marc Libs 13
Jean-Marc KADIMBA Add the doc about the "noteditable" param 12
Jonny Bradley 11
Jean-Marc Libs 10
Jean-Marc Libs 9
Jean-Marc Libs 8
Jean-Marc Libs 7
Jean-Marc Libs 6
Bernard Sfez / Tiki Specialist 5
luciash d' being 🧙 4
luciash d' being 🧙 fix the wiki syntax 3
Bernard Sfez / Tiki Specialist 2
Bernard Sfez / Tiki Specialist 1