From 5a1e5e34207b9b30ff42200158074953ca1cabab Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 12 Jun 2012 11:28:26 +0300 Subject: Add support for the anchor 'rel' attribute in the Pagination library --- user_guide_src/source/changelog.rst | 5 +++-- user_guide_src/source/libraries/pagination.rst | 24 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) (limited to 'user_guide_src/source') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index f342abf15..82116c9b1 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -154,7 +154,8 @@ Release Date: Not Released - Added a Redis driver to the :doc:`Caching Library `. - Added dsn (delivery status notification) option to the :doc:`Email Library `. - Renamed method _set_header() to set_header() and made it public to enable adding custom headers in the :doc:`Email Library `. - - Added an "index" parameter to the data() method in the :doc:`Upload library `. + - Added an "index" parameter to the data() method in the :doc:`Upload Library `. + - Added support for the anchor "rel" attribute in the :doc:`Pagination Library `. - Core @@ -177,7 +178,7 @@ Bug fixes for 3.0 - Fixed a bug where ``unlink()`` raised an error if cache file did not exist when you try to delete it. - Fixed a bug (#181) where a mis-spelling was in the form validation language file. - Fixed a bug (#159, #163) that mishandled Query Builder nested transactions because _trans_depth was not getting incremented. -- Fixed a bug (#737, #75) where pagination anchor class was not set properly when using initialize method. +- Fixed a bug (#737, #75) - :doc:`Pagination ` anchor class was not set properly when using initialize method. - Fixed a bug (#419) - auto_link() now recognizes URLs that come after a word boundary. - Fixed a bug (#724) - is_unique in form validation now checks that you are connected to a database. - Fixed a bug (#647) - _get_mod_time() in Zip library no longer generates stat failed errors. diff --git a/user_guide_src/source/libraries/pagination.rst b/user_guide_src/source/libraries/pagination.rst index f1653c913..560755fb6 100644 --- a/user_guide_src/source/libraries/pagination.rst +++ b/user_guide_src/source/libraries/pagination.rst @@ -254,3 +254,27 @@ Adding a class to every anchor 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. + +:: + + $config['anchor_class'] = 'myclass'; // class="myclass" + +********************************** +Changing the "rel" attribute value +********************************** + +By default, the rel attribute will be automatically put under the +following conditions: + +- rel="start" for the "first" link +- rel="prev" for the "previous" link +- rel="next" for the "next" link + +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 -- cgit v1.2.3-24-g4f1b