Important Announcement
PubHTML5 Scheduled Server Maintenance on (GMT) Sunday, June 26th, 2:00 am - 8:00 am.
PubHTML5 site will be inoperative during the times indicated!

Home Explore DEV-CodingTemplates-041013-0928-3

DEV-CodingTemplates-041013-0928-3

Published by tshegofatso, 2015-09-14 09:51:24

Description: DEV-CodingTemplates-041013-0928-3

Search

Read the Text Version

Coding TemplateseDesigners are always designing great templates but getting them into Everlytic can be tricky. We have developed an import script so adding,editing or deleting a templates from Everlytic is done using a standard .html file.Example A Simple Template <head> <!-- This must a unique string for each template, it is used to update templates later. You can use the following link for a random string generator http://www.random.org/strings/?num=1&len=20&digits=on&upperalpha=on&loweralpha=on&uniq ue=on&format=html&rnd=new --> <meta name=\"template_code\" content=\"g0K3rFhzc0f0tPeYiPXv\"/> <!-- A nice friendly template name that the customer will read in Everlytic --> <meta name=\"template_name\" content=\"Extreme Skate Boarding\"/> <!-- Any word that describes the category of temapltes you would like this tempalte to be grouped into --> <meta name=\"template_category\" content=\"Sport\"/> <!-- The name of the thumbnail image of 120x160px, all thumnails must be stored in /src/www/users/email_template_thumbs --> <meta name=\"template_thumbnail\" content=\"skateboarding_ramp.jpg\"/> <!-- if \"yes\" then the template will go live if \"no\" then the template will not be installed --> <meta name=\"template_approved\" content=\"no\"/> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /> <title>Everlytic Template</title> </head> <body> <p style=\"color:/*@colour text_colour|#666666*/ #666666;\">Hello World</p> <img src=\"/users/templates/business/image.jpg\" width=\"50\" height=\"50\" /> {% if foo == bar %} <p>Our website is in maintenance mode. Please, come back later.</p> {% endif %} </body> </html>TemplatesLocation & namingTemplates must be stored in the following directory as an .html file /src/setup/upgrade/templates_htmlThe recommend naming convention is

template_category-template_name-template_code.htmlFor example sports_skartboardRamp_8963894yf87344f34.htmlType camel case instead of spaces in the file names.Image ReferencingEverlytic template images must be stored in the following directory /src/setup/upgrade/templates_html/users/templatesFeel free to create organisation sub-folders but make sure all folders names are lower case and have no special characters or spaces. An imagereference might look something like <img src=\"/users/templates/sports/image.jpg\" width=\"50\" height=\"50\" />Template ThumbnailsAll templates need a 120 x 160px thumbnail so that a preview for the thumbnail can be displayed. All thumbnails must be stored in /src/setup/upgrade/templates_html/thumbnails.The meta tag will be implemented as follows <meta name=\"template_thumbnail\" content=\"skateboarding_ramp.jpg\"/>Template ColoursDuring template selection a customer can chose which colors they would like to use on the template.To achieve this functionality some specialtags need to be placed in the template chooser as can be seen in this example <p style=\"color:/*@colour text_colour|#666666*/ #666666;\">Hello World</p>The colour tag names that are avaliabel for use are text_colour page_colour body_colour title_colourControl StructuresWe use TWIG for control structure in code, this means that templates can be deeply customised with coding. The Twig manual and example canbe found here. http://twig.sensiolabs.org