Closed (fixed)
Project:
Flag
Version:
6.x-2.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
23 Jan 2011 at 19:00 UTC
Updated:
19 Nov 2012 at 15:35 UTC
Is there a way to have a flag work trough two seperate links. A 'Yes' link to flag and a 'No' link to unflag instead of one link (as it is now) to flag and unflag.
Comments
Comment #1
mooffie commentedYes, it's possible: theme the "link" Flag shows.
In the theme folder there's "flag.tpl.php". Change it to your liking (after copying it to your theme folder). See the README.txt there. When I say "link" it's in a loose sense: the .tpl can contain anything: button(s), image(s), span(s), link(s), whatever. In your case you probably want to have one
<span>(for the disabled choice at that moment) and one<a>(for the enabled one). But keep everything inside the "wrapper" you'll see there.(I don't see this as a valid feature request because different people may have different ideas as to how they want the link to show, and since we can't satisfy everybody we provide a generic solution, which is ultimately flexible.)
Comment #2
Michsk commentedGreat support. Thanks.
Comment #4
scott weston commentedThanks, Iasac... Very, very helpful!
Using Iasac's code as a starting point, I made a few tweaks which others might find helpful: