Code

A variety of free Code Tutorials & Snippets for Treepl CMS users.


30 CODE Snippet/s

v1.0.0

Dynamically create a Google Shop feed in XML format for your eCommerce products.

Details

v1.0.0

Allow the user to input an arbitrary price value in a generic payment form, such as donation forms or general invoice/service payment forms.

Details

v1.0.0

Complete a live CRM lookup (via AJAX) to check if an email address exists after the user enters it in an email field and before the form is submitted.

Details

v1.0.0

List all past Events, future Events, or Events by a set date range, including Liquid date calculations.

Details

v1.0.0

This Liquid code will hide your Event item in the list view if its capacity is full AND it’s marked as ‘Hide When Full’.

Details

v1.0.0

Add links to the previous and next module items from an items detail page.

Details

v1.0.0

This snippet displays a product's Volume Discount information in a more meaningful way with quantity brackets and formatted pricing.

Details

v1.0.0

This snippet displays the reCAPTCHA policy badge inline within your form layout instead of the default floating badge at the bottom of the page.

Details

v1.0.0

This snippet displays a simplified “Next and Prev” style pagination for any module.

Details

v1.0.0

This snippet displays a date friendly conversion for the number of secs/mins/hrs/days/wks/mths/yrs since an item was posted. (supports language customisations)

Details

v1.0.0

Display the content in the WYSIWYG editor more inline with the site’s styles (or alternate custom styles).

Details

v1.0.0

This could be used for showing a different hero image on a home page every time a person visits the page, or just to change things up a bit and give a bit of interest to a page.

Details

v1.0.0

Sometimes you need to make a change to a page/module layout/module item content at some distant time in the future, or perhaps at an inconvenient time.

Details

v1.0.0

Auto-submit a prefilled login form, to log in an anonymous user, if reCAPTCHA v2 is successfully completed.

Details

v1.0.0

Display member details, such as username and subscribed secure zones, on any page.

Details

v1.0.0

A simple format for adding a copyright statement to your website with a self updating year date.

Details

v1.0.0

This utility provides a way to mark an item as ‘NEW’ when it has been edited, or added, in the last X number of days.

Details

v1.0.0

This little script intercepts any annoying browser alerts and converts them to nice, unobtrusive notification overlays.

Details

v1.1.0

This vanilla Javascript will to split a Full Name Field into the system First Name and Last Name Fields.

Details

v1.0.0

Liquid snippet to generate breadcrumbs for pages and module items based off the URL structure.

Details

v1.0.1

Simple image gallery referencing a folder of images with the File API along with a jQuery lightbox implementation.

Details

v1.0.0

Sort a Liquid collection by 2 different fields at once and override weight sorting when weighting is used.

Details

v1.0.0

Liquid snippet to place on your form submission page, to display customisable confirmation message and submission data formatting.

Details

v1.0.0

Simple Twitter & OpenGraph schema to add rich meta data for your pages for use with social media and other services.

Details

v1.0.0

Re-direct a form submission to a custom thank-you page.

Details

v1.0.0

Liquid snippet to output Font Awesome Icons for downloadable files from a Custom Module.

Details

v1.0.1

Liquid code snippet to apply versioning to your css, javascript and other asset files to override caching.

Details

v1.0.0

Liquid snippet to process images (resize, compress, etc...) by 'Device Type' using Liquid and Treepl's ImageProcessor.

Details