[[Dashboard | << Back to Dashboard ]] {| align="right" | __TOC__ |} = Exploring the HTMLHelper Plugin = == Overview == A cool utility that helps you when working with HTML, from creating doc types, to managing your js/css assets, to rendering tables and lists from data == img == Create image tags using the SES base URL or not === Returns === * This function returns ''any'' === Arguments === {| cellpadding="5", class="tablelisting" ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description''' |- | src || any || Yes || --- || The source URL to link to or a structure of name-value pairs to use to construct the image: [src,alt,class,width,height,title,rel] |- | alt || string || No || || The alt tag |- | class || string || No || || The class tag |- | width || string || No || || The width tag |- | height || string || No || || The height tag |- | title || string || No || || The title tag |- | rel || string || No || || The rel tag |- | noBaseURL || boolean || No || false || Prepends the setting of baseURL if false |} === Examples === == tag == Surround content with a tag === Returns === * This function returns ''any'' === Arguments === {| cellpadding="5", class="tablelisting" ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description''' |- | tag || string || Yes || --- || The tag to generate |- | content || string || No || || The content of the tag |- | attributes || struct || No || [runtime expression] || The attributes to use in the tag |} === Examples === == slugify == Create a URL safe slug from a string === Returns === * This function returns ''string'' === Arguments === {| cellpadding="5", class="tablelisting" ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description''' |- | str || string || Yes || --- || The string to slugify |} === Examples === == ol == Create ordered lists according to passed in values and arguments, compressed HTML === Returns === * This function returns ''any'' === Arguments === {| cellpadding="5", class="tablelisting" ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description''' |- | values || any || Yes || || An array of values or list of values |- | attributes || struct || No || [runtime expression] || Attributes for the enclosing OL tags |- | column || string || No || || If the values is a query, this is the name of the column to get the data from to create the list |} === Examples === == ul == Create un-ordered lists according to passed in values and arguments, compressed HTML === Returns === * This function returns ''any'' === Arguments === {| cellpadding="5", class="tablelisting" ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description''' |- | values || any || Yes || || An array of values or list of values |- | attributes || struct || No || [runtime expression] || Attributes for the enclosing UL tags |- | column || string || No || || If the values is a query, this is the name of the column to get the data from to create the list |} === Examples === == table == Convert a table out of data (either a query or array of structures or array of entities) === Returns === * This function returns ''any'' === Arguments === {| cellpadding="5", class="tablelisting" ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description''' |- | data || any || Yes || --- || The query or array of structures or array of entities to convert into a table |- | includes || string || No || || The columns to include in the rendering |- | excludes || string || No || || The columns to exclude in the rendering |- | attributes || struct || No || [runtime expression] || Attributes for the enclosing table tag |} === Examples === == addStyleContent == Open and close xhtml style tags so you can easily just add content === Returns === * This function returns ''any'' === Arguments === {| cellpadding="5", class="tablelisting" ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description''' |- | content || any || Yes || --- || The content to render out |- | addToHeader || boolean || No || false || Send to header or return content |} === Examples === == link == Create link tags, using the SES base URL or not === Returns === * This function returns ''any'' === Arguments === {| cellpadding="5", class="tablelisting" ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description''' |- | href || any || Yes || --- || The href link or a structure of name-value pairs to render: keys [href,rel,type,title,media] |- | rel || any || No || stylesheet || The rel attribute |- | type || any || No || text/css || The type attribute |- | title || any || No || || The title attribute |- | media || any || No || || The media attribute |- | noBaseURL || boolean || No || false || Prepends the setting of baseURL if false |- | charset || any || No || UTF-8 || The charset to add, defaults to utf-8 |} === Examples === == br == Generate line breaks === Returns === * This function returns ''any'' === Arguments === {| cellpadding="5", class="tablelisting" ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description''' |- | count || numeric || No || 1 || The number of breaks |} === Examples === == heading == Generate header tags === Returns === * This function returns ''any'' === Arguments === {| cellpadding="5", class="tablelisting" ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description''' |- | title || string || Yes || --- || The header content |- | size || numeric || No || 1 || The header size: h1, h2, hx |} === Examples === == addAsset == Add a js/css asset(s) to the html head section. You can also pass in a list of assets via the asset argument to try to load all of them. You can also make this method return the string that will be sent to the header instead. === Returns === * This function returns ''any'' === Arguments === {| cellpadding="5", class="tablelisting" ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description''' |- | asset || any || Yes || --- || The asset(s) to load, only js or css files. This can also be a comma delimmited list. |- | sendToHeader || boolean || No || true || Send to the header via htmlhead by default, else it returns the content |} === Examples === == meta == Helps you generate meta tags === Returns === * This function returns ''any'' === Arguments === {| cellpadding="5", class="tablelisting" ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description''' |- | name || any || Yes || --- || A name for the meta tag or an array of struct data to convert to meta tags.Keys [name,content,type] |- | content || any || No || || The content attribute |- | type || string || No || name || Either ''name'' or ''equiv'' which produces http-equiv instead of the name |} === Examples === == nbs == Generate non-breaking spaces ( ) === Returns === * This function returns ''any'' === Arguments === {| cellpadding="5", class="tablelisting" ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description''' |- | count || numeric || No || 1 || The number of spaces |} === Examples === == addJSContent == Open and close xhtml javascript tags so you can easily just add content === Returns === * This function returns ''any'' === Arguments === {| cellpadding="5", class="tablelisting" ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description''' |- | content || any || Yes || --- || The content to render out |- | addToHeader || boolean || No || false || Send to header or return content |} === Examples === == docType == Render a doctype by type name: xhtml11,xhtml1-strict,xhtml-trans,xthml-frame,html5,html4-strict,html4-trans,html4-frame === Returns === * This function returns ''any'' === Arguments === {| cellpadding="5", class="tablelisting" ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description''' |- | type || string || No || xhtml1-trans || The doctype to generate |} === Examples ===