Giter Site home page Giter Site logo

cat2's Introduction

#cat2

Version 1.1.1

  • Requires: ExpressionEngine 2

Description

Convert between category name, category id and category url title. Query results are cached, so you can use the same tag multiple times in your template without additional overhead.

Installation

  1. Create a folder called 'cat2' inside ./system/expressionengine/third_party/
  2. Move the file pi.cat2.php into the folder

##Tags:

  • {exp:cat2:id}
  • {exp:cat2:name}
  • {exp:cat2:url_title}

##Parameters:

  • category_url_title=
  • category_name=
  • category_id=
  • category_group=
  • debug="yes|no"

##Example use:

category_id from category_url_title:

{exp:cat2:id category_url_title="my_category" category_group="5"}

category_id from category_name:

{exp:cat2:id category_name="my category" category_group="5"}

category_name from category_id:

{exp:cat2:name category_id="25" category_group="5"}

category_name from category_url_title:

{exp:cat2:name category_url_title="my_category" category_group="5"}

category_url_title from category_id:

{exp:cat2:url_title category_id="25" category_group="5"}

category_url_title from category_name:

{exp:cat2:url_title category_name="my category" category_group="5"}

Can also be used as a tag pair, e.g.:

{exp:cat2:id category_url_title="my_category" category_group="5" parse="inward"}
	{category_id}
{/exp:cat2:id}

{exp:cat2:name category_id="25" category_group="5" parse="inward"}
	{category__name}
{/exp:cat2:name}

{exp:cat2:url_title category_id="25" category_group="5" parse="inward"}
	{category_url_title}
{/exp:cat2:url_title}

cat2's People

Contributors

croxton avatar nathanpitman avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.