Different Editor Pages for Different Users

37 posts by 12 authors in: Forums > CMS Builder
Last Post: September 22, 2011   (RSS)

By Toledoh - December 12, 2010

Hi Chris.

I'm not sure what to do here.

I have a section:Home Slider
Within it, I have a list field: type. The options in "type" are image|code|iframe.

The idea is that I have a jquery slider on the homepage, and the editor can populate each slide with either an image, some code (like embed code from youtube), or a URL that is inserted via an iframe.

How do I go about displaying the appropriate input fields depending on the "type" selected?
Cheers,

Tim (toledoh.com.au)

By Toledoh - December 13, 2010

Hi Chris,

I couldn't get it to work. I've set up a test thinking that maybe I had something interfering....

I have a section "test"
I have a list field "select" with options "simple" and "complex"

Within the plugin, I have;
// For each section and list field, copy this block
// Fields will start hidden if they appear in any "fields to show" list
$GLOBALS['SHOWHIDE_DEPENDANT_FIELDS_CONFIG']['test']['select'] = array(
// list option => fields to show
'' => array(), // show these fields when the topmost '<select>' option is selected
'simple' => array('simple1,simple2'),
'complex' => array('complex1,complex2'),
);


I've attached a few screen grabs and code...
Cheers,

Tim (toledoh.com.au)

By aev - December 14, 2010

Hi Chris,

I can't get this to work:

// For each section and list field, copy this block
// Fields will start hidden if they appear in any "fields to show" list
$GLOBALS['SHOWHIDE_DEPENDANT_FIELDS_CONFIG']['nav1']['template'] = array(
// list option => fields to show
'' => array(), // show these fields when the topmost '<select>' option is selected
'standard' => array('content','content_image'),
'firstsub' => array('content','content_image'),
'list' => array('content','content_image','summary'),
);


I have a list field called 'template' inside the a CategorySection called 'nav1'.

Any suggestions?

-aev-

Re: [aev] Different Editor Pages for Different Users

By Chris - December 14, 2010

Hi aev,

Can you fill out a [url http://interactivetools.com/support/]Second Level Support Request[/url] with my name in the comments field please? I'd like to take a look and see if I can't figure out what's going on.
All the best,
Chris

By Chris - December 14, 2010

Hi Tim,

You'll need to add some quotes around those commas:

'simple' => array('simple1','simple2'),
'complex' => array('complex1','complex2'),


If that doesn't fix things, could you please fill out a Second Level Support Request too? :)
All the best,
Chris

By Toledoh - December 14, 2010

support request sent...
Cheers,

Tim (toledoh.com.au)

Re: [Toledoh] Different Editor Pages for Different Users

By Chris - December 14, 2010

Hi Tim,

Thanks! I fixed a bug and have uploaded a new version (v0.02). I've already updated yours, Tim, and your test section is working for me. :)

@aev: Please download the patched plugin and see if that fixes your problem.
All the best,
Chris

By aev - December 15, 2010

Hi Chris,

your updated plug-in worked great!

What we would like next is this to be a built-in feature, with configuration done inside the CMSB Admin > Section Editor page.

Thanks for the plugin!

-aev-

Re: [aev] Different Editor Pages for Different Users

By Toledoh - December 15, 2010

Brilliant - thanks Chris!
Cheers,

Tim (toledoh.com.au)