Closed (fixed)
Project:
Display Suite
Version:
7.x-1.0
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
3 May 2011 at 22:51 UTC
Updated:
31 Jul 2011 at 11:11 UTC
I felt pretty solid adding them in 6.x, but it seems there are only block and code fields are ported for D7. Am I missing something or are there any suggested workarounds?
Comments
Comment #1
swentel commentedIt's supported (but wasn't in ds.api.php, sorry for that, added now) - comment uses it a lot, see ds.ds_fields.info.inc for that, so should work pretty much out of the box.
Comment #2
sleamey commentedThanks a lot, but the code below doesn't work. What did I forget?
Or maybe I initially asked a wrong question? The goal is to add a variable in theme preprocess function and have an ability to manage its display position with DS UI.
In 6.x branch I used to write something like that in template.php:
...and then adding a new preprocess field with field key 'myfield' thru UI. The most confusing thing is that "preprocess fields" aren't mentioned anywhere in 7.x UI
Comment #3
swentel commentedI'll have to try this out this weekend, maybe there is something strange happening with preprocessing of terms.
Comment #4
sleamey commentedOne more thing I've noticed: mytheme_ds_fields_info is NEVER called, so it's not a term-specific issue. Does it mean I need to create a module and implement hook_ds_fields_info there instead of a theme?
And one more question: the option to create preprocess fields thru UI is removed by some reason or just not implemented yet?
upd: I moved hook_ds_fields_info from theme to separate module and new fields appeared on 'manage display' pages, now I can rearrange them... but field values don't display for terms (node fields display as expected), moving preprocess function also doesn't help.
Finally it seems we have to separate issues:
1) Inability to create preprocess field without creating a module
2) 'there is something strange happening with preprocessing of terms'
Comment #5
swentel commentedPreprocess fields can be managed from the UI again. I'll look into the terms problem later this day or week.
Comment #6
swentel commentedOk, it was inconsistency in core again re: preprocess variables and the object key name it's passing on. Fixed in dev now. (sorry this took so long, lot's of other things on my mind)