-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
116 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,55 @@ | ||
VZ Picky | ||
======== | ||
|
||
VZ Picky will display a dropdown <select> list of all the unique values for a particular custom field. Perfect for advanced search forms! | ||
VZ Picky will display a dropdown <select> list of all the unique values for a particular custom field. Perfect for advanced search forms! You can also use it as a tag pair to loop through the unique values and generate your own markup. | ||
|
||
Usage | ||
----- | ||
|
||
{exp:vz_picky field="field_name"} | ||
### Single tag | ||
|
||
field="" - The short name of the custom field to pull values from. | ||
<select> | ||
{exp:vz_picky field="field_name"} | ||
</select> | ||
|
||
Outputs a list of `<option>` elements containing each unique value in the custom field. | ||
|
||
### Tag pair | ||
|
||
{exp:vz_picky field="field_name"} | ||
{value}<br/> | ||
{/exp:vz_picky} | ||
|
||
Loops through each unique value in the field. | ||
|
||
Required parameter | ||
------------------ | ||
|
||
`field` - The short name of the custom field to pull values from. | ||
|
||
Optional parameters | ||
------------------- | ||
|
||
value="" - Value to pre-select. | ||
`separator` - You can further break apart each value using this parameter. If a field contains a comma-separated list of tags, for instance, this will list each tag as its own option | ||
|
||
`sort="alpha"` - Sort the values alphabetically. If this is not set, they will be displayed in the order they appear in the database. | ||
|
||
separator="" - You can further break apart each value using this parameter. If a field contains a comma-separated list of tags, for instance, this will list each tag as its own <option>. | ||
`site_id` - On a multi-site installation, the id of the site to use. Defaults to 1. | ||
|
||
placeholder="" - Text to display when nothing is selected. | ||
#### The following parameters only apply to the single-tag usage: | ||
|
||
hide_placeholder="yes" - Do not display any placeholder element. Mostly useful for multiple-selects. | ||
`value` - Value to pre-select. | ||
|
||
sort="alpha" - Sort the values alphabetically. If this is not set, they will be displayed in the order they appear in the database. | ||
`placeholder` - Text to display when nothing is selected. | ||
|
||
site_id="" - On a multi-site installation, the id of the site to use. Defaults to 1. | ||
`hide_placeholder="yes"` - Do not display any placeholder element. Mostly useful for multiple-selects. | ||
|
||
Installation | ||
============ | ||
|
||
Place the vz_picky folder into /system/expressionengine/third_party/. That's it, you're done! | ||
Place the vz_picky folder into /system/expressionengine/third_party/. That's it, you're done! | ||
|
||
Support | ||
======= | ||
|
||
This is provided for free with no guarantee or promise of support. However, if you run into any trouble or have a suggestion, please post an issue (or a pull-request!) at https://github.com/elivz/vz_picky.ee_addon. I'll do my best to help as time allows. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters