sn_ct - Use to implement small text within pages
sn_ct([uids:string, format:string, publish:string, lg:string, ct:string, filter:string, module:string, prefix:string, parms...]
This function is use to implement small texts within pages.
sn_ct use the table ct (by default) to save information.
sn_ct will try to read table ct for code with value code, on table specify with parameter table (by default "pages") with uid specify by parameter uid (by default page.rows.uid) with language specify by parameter lg (by default (lg.rows.lg).
If an entry is found, the texte for the language will be return
If no entry is found, an new entry will be added with the value of code for both french and english.
if positionnal parameter are used, the code is used for calling function printf with the parameters
If filter is used, then the code is passed threw the function esc with the corresponging filters
format can be used to specify the type of content. ck for an html editor and text for a text which is the default
If edit if true (which is the default), the return string is enclosed in a div for pencil edition.
If module is specified, then this ct will be used for this module
Parameter publish specify the publication script with the uids.
%include "/extenso/functions/sn_ct.snc"; {_{sn_ct(code:"Communication et société",lg:lg.rows.lg,publish:"/publish/ressources.sn",uids:ressource.rows.uid)}} {_{ sn_ct("Utilisateur", publish:"/publish/sn_widgets.sn",uids:widget.rows.uid)}}
Written by Pierre Laplante
1.1 2014-10-22 14:24:14 laplante@sednove.com
1.0 2014-09-09 21:24:14 laplante@sednove.com