Loading...
 
Skip to main content

Custom Share Module 0.1dev

Features / Usability

Features / Usability


smarty plugins / modifiers in a tracker template

posts: 12

I want to display just the last 5 characters of {$f_131} in a tracker template. I am using a wiki page as a tracker template for now, with appropriate permissions. Is it possible to do this with Smarty plugins or modifiers?

I was hoping something like {$f_131|substr:-5} would work but the parser misinterprets the : character.

So I tried funny stuff like {{{$f_131|substr:-5}}} buy no joy. Can someone verify if this is possible?

I am using Tiki 15.3 on LAMP; the following is in a standard wiki page:

Copy to clipboard
{trackerlist trackerId="12" fields="100:101:109:131" wiki="Buyer-job-add-tpl" list_mode="csv"}


This is the Buyer-job-add-tpl template content:

Copy to clipboard
{TRACKER(trackerId="1" fields="151:149:187:188:53:3:4:5:6:12" action="Send" url="tiki-index.php?page=Buyer+-+Dashboard&itemId={&f_itemId}#contentuser_tabset_01-3" values="{ {promoterId} }:{$f_109}:{$f_131}" ignoreRequestItemId="y")} Job Added! {TRACKER}


I want to pass the last five characters of {$f_131} as part of the values parameter. Please help.

  • promoterId curly brackets are as they should be in the actual code, I have had to put a space between brackets above so that they show in forums.
posts: 215

In /lib/smarty_tiki/ there is a modifier.substring.php
Based on the information in that, try: {$f_131|substring:-5:5}