Skip to content
This repository has been archived by the owner on Mar 29, 2018. It is now read-only.
/ twigSlugify Public archive

A plugin for Phile that adds a Twig filter that will slugify a string

License

Notifications You must be signed in to change notification settings

PhileCMS/twigSlugify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Note: This repository is abandonded. Use https://github.com/PhileCMS/phileTwigFilters instead.

twigSlugify

A plugin for Phile that adds a Twig filter that will slugify a string

1.1 Installation (composer)

php composer.phar require phile/twigSlugify:*

1.2 Installation (Download)

  • Install Phile
  • Clone this repo into plugins/phile/twigSlugify

2. Activation

After you have installed the plugin. You need to add the following line to your config.php file:

  • add $config['plugins']['phile\\twigSlugify'] = array('active' => true); to your config.php

What Is This For?

This new Twig filter allows you to slugify a string. This is useful for making safe URLs, HTML-safe class/id names, or just cleaning up general strings.

Examples:

{{ current_page.title | slugify }}

{{ "This Is an UNSAFE __and strange      string" | slugify }}

About

A plugin for Phile that adds a Twig filter that will slugify a string

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages