2017 © Pedro Peláez
 

craft-plugin sproutactive

Simplify navigation and URL-based logic in your templates.

image

barrelstrength/sproutactive

Simplify navigation and URL-based logic in your templates.

  • Friday, April 14, 2017
  • by BarrelStrength
  • Repository
  • 2 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

No Maintenance Intended, (*1)

In an effort to reduce the number of packages we publicly maintain, Sprout Active will not be migrated to Craft 4. If you'd like to take the helm or take responsibility over maintaining the repository please reach out: sprout@barrelstrengthdesign.com., (*2)


Sprout Active

Overview

Simplify navigation and URL-based logic in your templates., (*3)

Sprout Active makes it simple to control the active classname in your navigation or conditional content based on your URL segments or your full URL., (*4)

Usage

Sprout Active provides the active and activeClass Twig Filters to test for matching URL segments and output a class to make an element active., (*5)

The most simple version of these filters will match the first segment in the URL http://example.com/about-us. If no match is found, they will return blank., (*6)

``` twig {{ active('about-us') }} {# Output if match: active #}, (*7)

{{ activeClass('about-us') }} {# Output if match: class="active" #}, (*8)

{{ activeClass(entry.slug) }} ```, (*9)

See the documentation for more advanced use cases., (*10)

Documentation

See the Sprout Website for documentation, guides, and additional resources., (*11)

Support

, (*12)

The Versions

14/04 2017

dev-craft3/dev

dev-craft3/dev

Simplify navigation and URL-based logic in your templates.

  Sources   Download

14/04 2017

dev-release/v2.0.0-craft3

dev-release/v2.0.0-craft3

Simplify navigation and URL-based logic in your templates.

  Sources   Download

03/02 2017

dev-master

9999999-dev

Simplify navigation and URL-based logic in your templates.

  Sources   Download

03/02 2017

2.0.0

2.0.0.0

Simplify navigation and URL-based logic in your templates.

  Sources   Download