EE 1
EE 2
Cat2

Developer

Mark Croxton

3rd Party (Free)

70 downloads (last 90 days)

Download v1.1.1

Compatibility

If an item is crossed out, it might be untested, not applicable or incompatible. Contact the developer to be sure.

  • Updater
  • Multi Site Manager
  • Stand Alone Entry Form
  • Low Variables
  • Content Elements
  • Better Workflow
  • Matrix
  • Grid
  • Entry API
  • Publisher

Requirements

  • jQuery for the Control Panel

Add-On Type(s)

Plugin

Tags

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 extra overhead.

Installation

     
  • Create a folder called ‘cat2’ inside ./system/expressionengine/third_party/
  •  
  • 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}

Download Cat2

EE Support Downloads Add-On Version Release Date
Not Specified Download 1.1.1 2013-07-05 12:33 PM

This entry was created July 5, 2011, 12:08 pm.
This entry was last updated July 5, 2013, 7:34 am.

Disclaimer: Information about ExpressionEngine add-ons is provided as a service to you, the user, and every member of the ExpressionEngine community. devot:ee is not responsible if you hose, mangle, wreck, or otherwise destroy your EE website by installing an add-on that you found out about at this site, regardless of its rating, Favorites status, commercial or free status, or general popularity. Caveat EEmptor!

6 Reviews:

abed 11.19.13

Rating - {addon_rating_average}

Such a convenience! So many applications and its so simple to use. It’s also up on GitHub: https://github.com/croxton/cat2

Bitbang 10.19.13

Rating - {addon_rating_average}

Hace exactamente lo que dice. Me ahorró muchísimo tiempo en programación. Debería ser parte del core de EE

shorn 04.28.13

shorn
Rating - {addon_rating_average}

Super little add-on. I hit a problem with Low Seg2Cat when I had identical category url titles in different groups. This solved that easily. Thank you.

o-leary 01.15.13

Rating - {addon_rating_average}

Brilliant Add-On, thanks so much! I did find different category group values stored in the same variable if some params are the same, ie group 5 or 7 both have entry “default”. ID’s probably clash too. You can concatenate all the parameters, using that as the cache array key to fix it. :)

zizther 01.19.12

Rating - {addon_rating_average}

Really handy add-on! Thank Mark

Mark Bowen Design 08.17.11

Mark Bowen Design
Rating - {addon_rating_average}

Absolutely fantastic plugin!

Needed this due to using Structure on a site and having to find out the category_id from the category_name in the URL.

Does exactly what it says on the tin and a whole lot more.

Thanks Mark.