Download the PHP package mrnebbi/craft-template-tools without Composer
On this page you can find all versions of the php package mrnebbi/craft-template-tools. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mrnebbi/craft-template-tools
More information about mrnebbi/craft-template-tools
Files in mrnebbi/craft-template-tools
Package craft-template-tools
Short Description Craft CMS Plugin to provide some extra functionality to Twig templates
License
Informations about the package craft-template-tools
Template Tools
A Craft plugin to provide twig filters to help with template building.
Please note: As of version 2.0, I've removed the Query Strings functionality from template tools. Please use my Query Strings plugin.
firstTag
Easily add a class, ID, or other attribute to the first element of a specific type. Useful for adding a class to the first paragraph.
Add a class
By default this adds a class name to the first P tag.
Add a . or # to set an ID or Class.
Add an ID
Add to a non paragraph
Sets a class name or ID to the first tag of a type specified by you. e.g.
Add a . or # to set an ID or Class.
Add custom attribute and value to a non paragraph
Sets a value for a specified attribute to the first tag of a type specified by you.
getFirstParagraph
Retrieve the first paragraph from content.
Get paragraph only
Get paragraph and remove P tags
Add a flag of true to remove the P tags from the content.
wrapLinesInTag
This wraps any lines in multiline text in a tag of your choosing.
preserveQueryStrings
Removed Query Strings functionality. Please use my Query Strings plugin.
The Preserve Query String filter allows you to add |preserveQueryStrings to any URL output in twig, and it will keep the query strings as they should appear in the URL.
getQueryStrings
Removed Query Strings functionality. Please use my Query Strings plugin.
Pull an array of query strings from Craft. This gets around the problem of duplicated query string keys being lost, turning them into an array you can loop through.
An array will be returned with objects. Use .key and .value.