Issues

ZF-9300: Add support for rel="nofollow" attribute on anchors in Zend_Navigation view helpers

Description

Currently Navigation supports rel and rev attributes, but these are only used by the Links view helper. I've read multiple people needing rel="nofollow" on anchors, and although it's easily implemented using a custom view helper, it's also no work to implement this in the framework itself. So why not support it?

Also see: http://framework.zend.com/issues/browse/ZF-7733

Comments

Patch attached, please review and commit

Hi Maghiel, there are also for the "a" element many more options: [http://w3.org/TR/html4/…] Your patch allows only one option!

Hey Kai,

I wrote this patch because at that point there were some people on the mailing list asking to support rel="nofollow". But you're right, why not add all the options then?

I'll look deeper into this and change the issue accordingly (and attach a patch eventually), but now first going to have my friday night ;)

Thanks for the input!

At the moment you can only set the relation for "Zend_View_Helper_Navigation_Links" with "Zend_Navigation_Page::setRel()".

We need a solution to set relations for the HTML Link element and for the HTML A element.

The HTML5 specification includes a nice overview in a table: www.w3.org/TR/html5/links.html#linkTypes" rel="nofollow">HTML5: 4.12 Links - 4.12.4 Link types There you can see which type is allowed for the Link element and which is allowed for the A element.

Hi Maghiel, any updates on this issue?