Closed (fixed)
Project:
Template Picker
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
31 Mar 2015 at 19:32 UTC
Updated:
9 Sep 2017 at 17:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
bryanbraun commentedThanks for reporting, and for the recommendations.
I've intentionally shied away from setting up a admin page for enabling/disabling template picker per entity, because I wanted to manage the enabling/disabling of each entity (and content-type) on a per-role basis and figured that I could do that all in one place on the permissions page. It has worked pretty well with only a few downsides:
entity_get_info()(which I use for printing all the entities in the permissions). I had set up the blacklist as a quick fix to address this issue.I think that maybe an alter-hook to add to the blacklist is probably the simplest way to address the issue without reworking the fundamentals of how the feature is enabled per-role. There may be some way to address the source of the issue, (forms with isset($form['#entity_type']) don't quite line up with entities returned by
entity_get_info()), but nothing that I can immediately find.I'm tied up with some other priorities right now, but I hope to implement the alter-hook in the future. As always, patches would expedite the process. :)
Comment #2
drupalgideonI know this is an old issue, but I've recently started working on a Drupal 7 project again and needed to use this module. I've created a really simple patch to allow someone to alter the blacklist IDs using a hook. Before I was putting
$form['template_picker']['#access'] = FALSE;in a load ofhook_form_FORM_ID_alter()s.Comment #3
bryanbraun commentedHey, I just wanted to jump in and say that I saw your patch. It looks promising and I hope to be able to review it sometime next week.
Comment #4
bryanbraun commentedJust tested this and it works great... I'm pushing up the commit now.
Thanks for the contribution!