sn_ct - Use to implement small text within pages.
This function is use to implement small texts within pages. sn_ct use the table ct to save information unless the parameter ct define a different table.
Widget name/resource + text of the ct
If the widget is called "offer_list" and the text "Cancel", then the ct code should be "offer_list_cancel". {_{%include "/extenso/functions/sn_ct.snc"; sn_ct("offer_list Cancel", publish:"/extenso/publish/pages.sn", edit:true, uids:page.rows.uid, module:"contacts")}_}
Check if the publication script (pages.sn, sn widget.sn ...) you will use is in the directory "/extenso/publish/" or in "/publish/" at the root.
1. Ct in a non published widget
Add once at the top of the page:
{_{ %include "/extenso/functions/sn_ct.snc"; use page; }_}
Function call
{_{sn_ct("emploi_vedette Days remaning", publish:"/extenso/publish/pages.sn", edit:true, uids:page.rows.uid, module:"contacts")}_}
2. Ct in a published widget
Add once at the top of the page:
{_{ %include "/extenso/functions/sn_ct.snc"; use widget; }_}
Function call
{_{sn_ct("emploi_vedette Days remaning", publish:"/extenso/publish/sn_widgets.sn", edit:true, uids:widget.rows.uid, module:"contacts")}_}
3. Ct in email
Add once at the top of the page:
{_{ %include "/extenso/functions/sn_ct.snc"; use page; }_}
Function call
{_{sn_ct("email Days rue", publish:"/publish/email.sn", edit:true, uids:page.rows.uid, module:"contacts")}_}
4. Ct of a resource
Add once at the top of the page:
{_{ %include "/extenso/functions/sn_ct.snc"; use ressource; }_}
Function call
{_{sn_ct("email Days rue", publish:"/publish/ressources.sn", edit:true, uids:ressource.rows.uid, module:"contacts")}_}
1. Input type button - put edit to false
<input type="button" class="button-print" value='{_{sn_ct("emploi_vedette Imprimer", publish:"/extenso/publish/pages.sn", edit:false, uids:page.rows.uid, module:"contacts")}_}’ />
2. Class button in a link - put edit to true
<a href="#" class="btn btn-primary btn-grey btn-rg full-width">{_{sn_ct("emploi_vedette Imprimer", publish:"/extenso/publish/pages.sn", edit:true, uids:page.rows.uid, module:"contacts")}_}</a>
If we use several time the same ct in a gabarit (widget/resource/email), we use the same code not to duplicate the ct un the shared content table.
1. Editing an item
By example, you want a pen towards the edition of an item on the mass_address table:
<div class="sn_pencil" data-sn_title1="Edit" data-sn_class1="edit" data-sn_link1="/extenso/extranet/mas_address/{{lg.rows.lg}}/edit.snc?uid=\{_{etablissement.rows.uid}_}&sn_modal=t"> VOTRE HTML </div>
2. A pen towards a list of items
<div class="sn_pencil" data-sn_title1="Edit" data-sn_class1="edit" data-sn_link1="/extenso/extranet/mas_address/{_{lg.rows.lg}_}/index.snc?sn_modal=t"> VOTRE HTML </div>
Written by Pierre Laplante, <lapante@sednove.com>
1.0 2014-05-12 laplante@sednove.com
1.1 2016-05-17 pascale@sednove.com
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
1.0 2014-09-09 21:24:14 laplante@sednove.com