pepperstreet VIP
Total posts: 3,837
19 Sep 2012 01:44

Recently played with Spiralscripts free "ImGen" extension. Nice features. Besides image resizing, it comes with additional content plugins. One of them allows to restrict the view to certain usergroups... you can decide if the viewer sees nothing or a placeholder image.

Since Cobalt fields can also be restricted, i think a visual placeholder for image fields (or media fields in general) would be nice.

Currently fields are hidden or marked with a text hint, if restricted by Emerald.

Is it worth to add a placeholder option in parameters?

Or do it via custom templates only? (how do I check for a restriction and its level?)

EDIT:

edited topic title. restricted OR empty.

Last Modified: 02 Mar 2014


Sergey
Total posts: 13,748
19 Sep 2012 06:40

Or do it via custom templates only? (how do I check for a restriction and its level?)

Not possible on template level. template even will not be loaded if restricted by Emerald. It need to change restriction logic.


Sergey
Total posts: 13,748
19 Sep 2012 08:57

$item->fields_by_id[10]->params->get('core.show_intro', 0);


Sergey
Total posts: 13,748
19 Sep 2012 19:45

If you want to find out how to get this or that parameter in backend Inspect form element

On the picture above you see image parameter for initial directory. The name of the parameter is

params[params][directory]

it means to get it you need

$item->fields_by_id[10]->params->get('params.directory', 0);


pepperstreet VIP
Total posts: 3,837
19 Nov 2012 18:53

... a visual placeholder for image fields (or media fields in general) would be nice. Currently fields are hidden or marked with a text hint ...

Is it worth to add a placeholder option in parameters?

Or do it via custom templates only?

Forgot about my own topic ;-)

I remember, ME Resources Picture field had a default image. Does it have a "comeback" in Cobalt ? Also useful for IMAGE, VIDEO field.

Powered by Cobalt