Closed (fixed)
Project:
Display Suite
Version:
7.x-2.x-dev
Component:
Code
Priority:
Critical
Category:
Feature request
Assigned:
Reporter:
Created:
10 Jun 2015 at 10:11 UTC
Updated:
2 Feb 2016 at 19:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
cimo75 commentedComment #2
aspilicious commentedI'll look at the way we generate the "theme hook suggestions" to see if it is possible to do this.
There is a possibility DS can't do that because we use a kinda special way to alter the templates.
To be continued.
Comment #3
aspilicious commentedComment #4
bceyssensIn this patch I added a template suggestion for specific entities. Template name format: ds-1col--node--{id}.tpl.php
cimo75 can you validate if this patch is working for you?
Comment #5
aspilicious commentedI tested this and it is working fine. Needs to be ported
Comment #7
aspilicious commentedSo apperantly this wasn't pushed :D
Comment #8
aspilicious commentedLets see...
Comment #10
aspilicious commentedComment #12
swentel commentedThis broke rendering of fieldable panel panes. It breaks on entity_extract_ids because it can't find the object (some entity types not putting the object in the root, but instead in '#elements').
Moving to critical as it can break existing installations heavily.
I've renamed $object to $entity_type for more clarity - you'll see the check on $vars[entity] further down in the patch, so I think I hit this already with fieldable panel panes once in the past :)
(maybe, we could simplify this function heavily in that case but declaring/re-using $bundle, $entity_type and $entity then, but that's maybe for a follow up)
Comment #13
swentel commentedComment #14
swentel commentedMoving to D7
Comment #15
swentel commenteddamn it, wrong patch, #elements was wrong
Comment #16
aspilicious commentedSwentel please commit this and create a release if it is that bad.
Comment #24
swentel commentedcommitted and pushed - will wait a bit for release. In case you see reports where there's a fatal on entity_extract_ids - just tell them to use dev :)
Comment #26
swentel commentedFWIW, I've added basic tests for the hook suggestions after this patch because of the $object => $entity_type rename, I wanted to make sure I really didn't break anything - and we can maybe start testing out more stuff.
See http://cgit.drupalcode.org/ds/commit/?id=2ccb1dd
I'll try to figure out if we can port that to D8, it's kind of handy :)
Comment #27
swentel commentedDid forward port of this as well - feel free to revert the $object rename in case you don't like it (I find it much clearer, but those things can be discussed of course).