Closed (fixed)
Project:
Rules Link
Version:
7.x-1.0-beta4
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 Mar 2013 at 15:21 UTC
Updated:
17 Oct 2016 at 21:21 UTC
Jump to comment: Most recent
Comments
Comment #1
nicolas bouteille commentedFor now I have added the "button" css class directly in the module on line 197 of rules_link.module
'#attributes' => array('class' => array('rules-link button'), 'rel' => 'nofollow'),
but I would like to know how I should do it in my template.tpl.php file or if there is another and better way.
Comment #2
nicolas bouteille commentedI actually also want to add a description below the button... so that makes me wonder, is the link a Drupal Field that I could actually theme using field--field-name.tpl.php ?
Comment #3
nicolas bouteille commentedOk for now I have hardcoded my description inside the "#suffix" parameter on line 199. This is so wrong + prevents me from using more than one Rules link on the whole website.
Really need some help on how I'm supposed to do that the right way. Thanks
Comment #4
Adon Irani commentedI've got the same use case here.
(Thanks Nicolas for the helpful info above).
Hoping to see this supported in a future release.
Kind regards,
Adon
Comment #5
ismail cherri commentedHi,
I've stumbled upon the same problem and here's how I solved it without hacking the module code:
Insert this in your theme template.php function then clear your cache.
Hope this helps someone out there :)
Comment #6
nicolas bouteille commentedAwesome thanks!
This time I needed a way to change the text with some HTML, perfect place to do it!
Comment #7
bazzmann commentedHi there, to us this function break the rules link functionality and it not pass the arguments correctly, displaying the json values instead.
Someone has tested it, without problems?
Thanks in advance,
M.
Comment #8
bazzmann commentedSOLVED: we solved the issue including the generated classes in the array to let ajax do the magic.
Thanks. :)
M.
Comment #9
apmsooner commentedAnother option is overriding the included tpl.php file accordingly. Nevertheless, this issue sounds resolved.
Comment #10
maxplus commentedHi,
I have tried #5 but I'm getting this error
I used the advise of #9 (I have put rules-lin.tpl.php in my theme folder and changed it a little bit) but then all rules links are themed in the same way.
=> It would be cool if we could create tpl files for specific rules links, something like rules-link--machine-name.tpl.php
Comment #11
apmsooner commented@maxplus,
I agree it would be nice to have more specific templates and while I tried myself to add a template suggestion by rules link name, my template never seems to get picked up in my theme. If i copy the basic rules-link.tpl.php file to my theme... it loads fine. Maybe someone else can comment on why this doesn't work: