ZF-4902: Cannot add 'id' attribute to a link when using the HeadLink helper


The tag is allowing to use "id" attribute but HeadLink() does not.

There is no way to add the "id" attribute using the HeadLink() helper which make is not usable if i need it.

It may be related to issue


According the the HTML Spec for the link tag id is not a valid attribute Can i ask why you need an id on a link tag?

Ignore my last comment I type before reading the whole page. It's linked to ZF-3111 as the same issue.

w3schools is a great site, but for (rea) formal specs I think we should use… the specific reason I need id on a link tag is for dynamic changing the css file that i'm using.

BTW, at the w3schools link, at the bottom, it indicate that LINK tag has the "Standard Attributes", which include id.


I agree. I'll run this by Matthew and/or Ralph and see what they say. If they give me the approval to go ahead with the patch i'll work on something.


I have started work on this and I should have something up by EOD tomorrow. I need to finish testing and update the docs to reflect these changes.

The fix was checked in with r13141