Adding "global" fields for a DCP block.
Permalink Browser Info Environment
Hi!
I'd like to add a couple of fields to a DCP block that shouldn't get repeated for each item. Instead, they should be entered once independent of the items. Is there a way for me to do that?
I'm aware that I can use custom templates, but what I'm trying to is let the user select a background image, and some other fields, for each item listing.
Thanks
I'd like to add a couple of fields to a DCP block that shouldn't get repeated for each item. Instead, they should be entered once independent of the items. Is there a way for me to do that?
I'm aware that I can use custom templates, but what I'm trying to is let the user select a background image, and some other fields, for each item listing.
Thanks
Type: | Discussion |
---|---|
Status: | New |
Unfortunately right now there is no way to add "global" fields to Designer
Content Pro blocks. It is definitely on our radar, but it's a decent amount
of effort so it will probably be another couple of months before we're able
to get that built.
In the meantime, I think custom templates are going to be the best
solution. Another alternative would be to make a custom attribute that is
set at the page level, then retrieve that in the block view via some code
like this:
$attr = Page::getCurrentPage()->getAttribute('your_attribute_handle');
if ($attr == 'green') {
//user entered "green", do something here...
}
Hope that helps.
-Jordan