0

I have added [edit node link] and [delete node link] in my view, which is rendered as

<a href="?q=node/52/edit&destination=product">Edit</a>

is there any hook (that's the elegant way) to alter the link to insert a font awesome icon before the link as below, thanks

<a href="?q=node/52/edit&destination=product"><i class="fa fa-pencil"></i> Edit</a>
  • Can you output the path token as a url rather than a full link, then add the rest of the markup yourself? I am assuming you are adding the tokens to a textfield input in the view somewhere. – 2pha Jan 25 '15 at 02:58
  • Thanks, 2pha. I cannot get the row link like "?q=node/52/edit&destination=product", the raw output of views contains the a element. – shrimpsdad Jan 26 '15 at 02:50
  • you could add the node id row, then use the [node:id] token – 2pha Jan 26 '15 at 04:09
  • Thanks, that's a way if I ignore the destination. But I just wonder if there's any hook so that I could implement with just a peace of code instead of changing every views. – shrimpsdad Jan 29 '15 at 07:33

1 Answers1

0

How about using jQuery for detecting those links (i.e. by "edit" word) and adding it some class. Something like described here:

Select <a> which href ends with some string

Community
  • 1
  • 1
MilanG
  • 6,994
  • 2
  • 35
  • 64