ParamEEter

Developer

Protean Web

3rd Party (Free)

MIT License Download v1.0

EE Version Support

  • ExpressionEngine 2

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
  • Webservice
  • Publisher

Requirements

  • jQuery for the Control Panel

Add-On Type(s)

Plugin

Tags

ParamEEter is a simple plugin that converts text (perhaps stored in a text field) into EE tag parameters, with various useful options.

This plugin is used to produce EE tag parameters from a delimited text string. This is useful for allowing one text field in a channel to be used to control lots of different parameters, instead of requiring a separate field for each parameter.

Imagine: In an “advanced settings” field in a channel, maybe you want to specify some parameters that you’d like to pass to a channel entries tag, as well as some embed variables to a template embed. ParamEEter allows you to pull specific variables out of this delimited “advanced settings” text field, that separately apply to the channel entries tag and template embed, while applying default values to variables not defined within the “advanced settings” text field. It also refuses to include invalid parameters, performs some character escaping, and intelligently chooses whether to use “single” or “double quotes” to prevent breaking tags. 

In the following examples, the text between the tag pairs would most likely be coming from a channel text field, or representing some other kind of dynamic content, and NOT be included statically as in these examples. (which would make this plugin rather useless)

SIMPLE EXAMPLE:
====================

{exp:parameeter}limit~1|search:title~Special Title|invalid paramter~contains space|invalid#parameter~contains symbol{/exp:parameeter}

Outputs: limit=“1” search:title=“Special Title”

*Invalid parameters are automatically removed above.


ADVANCED EXAMPLE:
=====================

{exp:parameeter params=“name|gender|age|state|city” default_params=“state=California|city=San Diego|age=Not Specified” quote=“single” value_delimiter=”=”}
gender=male|city=Los Angeles|height=6ft|name=Andrew’s Name
{/exp:parameeter}

Outputs: state=‘California’ city=‘Los Angeles’ age=‘Not Specified’ gender=‘male’ name=‘Andrew’s Name’

*Only parameters that are included in the “params” list are included in the final output.

Now that you’ve seen a few examples, you still might be wondering why this plugin is useful, so let me describe a use case:

The client wants to be able to add little “modules” of dynamic content throughout the site, for example, a list of upcoming events, or a brief blurb of the latest blog post. For this, I’ve used Brian Litzinger’s fantastic Template & Snippet Select extension, which allows me to add a fieldtype to my page channels giving the client the ability to include templates and snippets that I have designated as “safe” for including in the page. Taking it one step further, I include this fieldtype in a matrix field, so the client can include more than one template/snippet at the bottom of a page, and I also add a couple of options for including a template, like a limit for the number of results, whether to allow pagination, etc. The problem is, sometimes I’d like to be able to pass embed variables to these templates that perhaps only apply to a few templates, or that rarely need to be set by the client. Very quickly, the parameters add up, making the matrix field crowded. This is where paramEEter comes in. You can just add one additional text field to the matrix, to represent all extraneous parameters/options you’d like to pass to the template. What’s more, paramEEter allows you to define defaults in case particular options are not included in this text-field. It’s not the most straight-forward way for a client to modify the behavior of a template, but it does allow me to override template behavior from a channel entry without having to add additional options to the matrix. And, if you include a list of variables and their accepted values within the field description, its not too hard to figure out.

Hopefully I’ve explained the scenario well enough that a few people out there might benefit from this plugin!

Download ParamEEter

EE Support Downloads Add-On Version Release Date
Not Specified Download 1.0 Oct 7, 2011

This entry was created October 10, 2011, 7:59 am.
This entry was last updated October 17, 2011, 7:48 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!

Returns: devot:ee has a 30-day return policy on all commercial add-ons sold through devot-ee.com. If you need to return an add-on, do not go to the developer or the developer's site, but rather visit our returns page at https://devot-ee.com/returns to initiate your return. If you have questions, email support@devot-ee.com.

There are no reviews for this add-on yet.

What are you waiting for? Rate it and review it!