Right now, there are only two flag template suggestions: flag.tpl.php and flag--FLAG-NAME.tpl.php. I implemented a new link type and would find it wonderful if I could just drop a flag--FLAG-TYPE.tpl.php template to change the markup of those flags.

BTW, the module is Flag AJAX Confirm, providing Flag AJAX Confirmation forms as a link type.

Comments

barraponto’s picture

Version: 7.x-2.0 » 7.x-2.x-dev
Status: Active » Needs review

And here's a trivial patch.

barraponto’s picture

Dorgot the patch, duh.

joachim’s picture

Version: 7.x-2.x-dev » 7.x-3.x-dev
Status: Needs review » Needs work

Seems like a reasonable thing to add, but please roll for 3.x first.

Oh, and we need something about this to the link type definition hook documentation too please.

barraponto’s picture

Status: Needs work » Needs review
StatusFileSize
new430 bytes

There you go.

joachim’s picture

Status: Needs review » Needs work

Could we have some docs too?

On reflection, I think the best place for these would be the comment block in the actual tpl file -- just a list of what other template names can be used.

barraponto’s picture

Status: Needs work » Needs review
StatusFileSize
new10.63 KB

There we go.

Status: Needs review » Needs work

The last submitted patch, 1817644-flag-link-type-template-suggestions-6a.patch, failed testing.

barraponto’s picture

Status: Needs work » Needs review
StatusFileSize
new1.04 KB

Ugh, repo confusion :(

joachim’s picture

Status: Needs review » Fixed

Super, thanks!

Issue #1817644 by barraponto: Added flag template suggestion for link type."

joachim’s picture

Added change record here: http://drupal.org/node/1862218.

Feel free to flesh this out if you feel it needs it.

barraponto’s picture

Version: 7.x-3.x-dev » 7.x-2.x-dev
Status: Fixed » Needs review
StatusFileSize
new989 bytes

What about a backport?

joachim’s picture

Status: Needs review » Fixed

Seems fair enough -- it's not going to break anything existing.

Committed to 7.x-2.x.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.