diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-06-17 01:32:31 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-06-17 01:32:31 +0200 |
commit | 88c47278f775413b5a408f48d30bd279e34e601a (patch) | |
tree | 748b5cdd2f9e481bcc5c640c72da6bcb436fcbd8 /user_guide_src/source/libraries/pagination.rst | |
parent | 5ad6ba8dbd8ae7fcaddc2f289ddea8ce99811214 (diff) |
Pagination: fixed 'rel' attribute handling, added custom attributes support, deprecated 'anchor_class' setting
Diffstat (limited to 'user_guide_src/source/libraries/pagination.rst')
-rw-r--r-- | user_guide_src/source/libraries/pagination.rst | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/user_guide_src/source/libraries/pagination.rst b/user_guide_src/source/libraries/pagination.rst index 560755fb6..c4398d739 100644 --- a/user_guide_src/source/libraries/pagination.rst +++ b/user_guide_src/source/libraries/pagination.rst @@ -247,34 +247,30 @@ adding:: $config['display_pages'] = FALSE; -****************************** -Adding a class to every anchor -****************************** +**************************** +Adding attributes to anchors +**************************** -If you want to add a class attribute to every link rendered by the -pagination class, you can set the config "anchor_class" equal to the -classname you want. +If you want to add an extra attribute to be added to every link rendered +by the pagination class, you can set them as key/value pairs in the +"attributes" config :: - $config['anchor_class'] = 'myclass'; // class="myclass" + // Produces: class="myclass" + $config['attributes'] = array('class' => 'myclass'); -********************************** -Changing the "rel" attribute value -********************************** +.. note:: Usage of the old method of setting classes via "anchor_class" + is deprecated. -By default, the rel attribute will be automatically put under the -following conditions: +***************************** +Disabling the "rel" attribute +***************************** -- rel="start" for the "first" link -- rel="prev" for the "previous" link -- rel="next" for the "next" link +By default the rel attribute is dynamically generated and appended to +the appropriate anchors. If for some reason you want to turn it off, +you can pass boolean FALSE as a regular attribute -If you want to disable the rel attribute, or change its value, you -can set the 'attr_rel' config option:: - - // Disable - $config['attr_rel'] = FALSE; +:: - // Use a custom value on all anchors - $config['attr_rel'] = 'custom_value'; // produces: rel="custom_value"
\ No newline at end of file + $config['attributes']['rel'] = FALSE;
\ No newline at end of file |