I am trying to implement pinterest's pinit button using a snippet like the one below:
<h:outputLink value="http://pinterest.com/pin/create/button/" class="pin-it-button" count-layout="horizontal">
<f:param name="url" value="#{beanOne.someMethod}/sometext{prettyContext.requestURL.toURL()}"/>
<f:param name="media" value="#{beanOne.someOtherMethod}/sometext/somemoretext/#{beanTwo.someMethodTwo}-some-text.jpg"/>
<f:param name="description" value="#{beanTwo.someOtherMethodTwo}"/>
<img border="0" src="//assets.pinterest.com/images/PinExt.png" title="Pin It" />
</h:outputLink>
Here are the gotcha's:
- the whole markup is created from the combination of four different methods from two different beans as well as some static text
- the url parameters obviously need to be urlencoded, therefore I am using f:param inside h:outputLink so that they get urlencoded
- the generated
a
tag needs to have the non-standardcount-layout="horizontal"
attribute
Now my question is either one of:
- How can I inject the count-layout attribute into h:outputLink or the generated anchor tag
- Otherwise if I cannot, what would be another non-invasive (I don't want to change the bean methods) way to accomplish the required pinit button markup?
The required markup can be found at http://pinterest.com/about/goodies/ down in the "pin it button for websites" section.