Kayako logo
SupportSuite, eSupport and LiveResponse Discussion, troubleshooting and feedback related to Kayako's flagship support desk products SupportSuite, eSupport and LiveResponse.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  (#1) Old
eiden Offline
Member
 
Posts: 237
Join Date: Apr 2006
Location: Norway
Smarty-Light modifiers - 24-05-2006, 10:54 PM

I just read the Smarty-Light docs. I'm trying to get the modifiers to work in my templates.

I have tried to type som modifiers in, but nothing happens. I have cleared my cache btw.

<{"Might we make this sentence a little shorter, not a long run-on?"|truncate:50:"..."}>

Does anyone have a clue about this ?



From Smarty-Light documentation:
HTML Code:
truncate

Description
This modifier will trim a variable to a specific length. The first argument is the cut off length, with a default of 80. The second argument is the extender (see example). The last argument is a boolean indicating if you wish to break at words or at spaces only. 

Arguments
length (optional)
This is how long you want to truncate the string to. The default length is 80. 

trail (optional)
This is what you want to append to the end of the truncated string, indicating that it has been truncated. The default is "..." 

break words (optional)
This is a boolean asking you weather you want to break words apart or not. If set to true then a word such as "indicate" can be broken into "indi" and "cate". If set to false, the default, the word will be truncated on a space in the variable, if possible. 
Example
	
TEMPLATE
=============================
<% "Might we make this sentence a little shorter, not a long run-on?"|truncate %>

<% "Might we make this sentence a little shorter, not a long run-on?"|truncate:50:"..." %>

<% "Might we make this sentence a little shorter, not a long run-on?"|truncate:50:"...":true %>

OUTPUT
=============================
Might we make this sentence a little shorter, not a long run-on?
Might we make this sentence a little shorter,...
Might we make this sentence a little shorter, n...
   
Reply With Quote
  (#2) Old
eiden Offline
Member
 
Posts: 237
Join Date: Apr 2006
Location: Norway
28-05-2006, 07:04 PM

**Bump**

Anyone ? Varun, do you have anything so say about this ?
   
Reply With Quote
Reply

Tags
modifiers, smartylight

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Why smarty light? escMark SupportSuite, eSupport and LiveResponse 4 17-10-2006 09:47 AM
Smarty escape modifier sebenza Developers & Code 1 21-07-2006 05:26 PM
.tpl File Locations (For Smarty Engine) JaimeM Developers & Code 1 20-04-2006 02:09 PM



Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vBulletin Skin developed by: vBStyles.com


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46