Have editor see Content rather then see textarea when logged in

7 posts by 5 authors in: Forums > CMS Builder
Last Post: March 28, 2015   (RSS)

By gkornbluth - March 24, 2015 - edited: March 24, 2015

Hi Kenny,

I don't think you can do that for specific fields in the back end.

Any way that you can allow access through a front end form instead of the back end?

Then you can show the keyword field in the viewer while allowing editing of other fields in the form.

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

By Damon - March 24, 2015

Hi Kenny,

It sounds like you are wanting the admin user to be able to add/edit page title and metas, both keyword and description fields in CMS Builder and have editor users only be able to see that content but not edit it.

This can be done with some creative coding. Here is the steps:

1. Create your three fields: Page Title, Meta Keywords and Meta Descriptions
Edit these fields to make them Admin Only Access Level. When modifying the field, in the popup window, scroll to the bottom and for Advanced Options, click show all to see this option.

2. Create a new field for your section. The Field Type will be --seperator--. Doesn't need a Field Label or Field Name. For the Separator Type choose the HTML radio button. 

By default you will see this HMTL:

<tr>
<td colspan='2'>
</td>
</tr>

Change that to this:

<?php if (userSectionAccess($GLOBALS['tableName']) >= 9): ?>
<tr>
<td> Page Title: </td>
<td><?php echo htmlencode(@$GLOBALS['RECORD']['page_title']); ?></td>
</tr>
<tr>
<td> Meta Tag: </td>
<td><?php echo htmlencode(@$GLOBALS['RECORD']['meta_tags']); ?></td>
</tr>
<tr>
<td> Meta Description: </td>
<td><?php echo htmlencode(@$GLOBALS['RECORD']['meta_description']); ?></td>
</tr>
<?php endif ?>

This first line of code is used to only displays the output Page Title, Meta Tags and Meta Description for Editor users only. Admin users will see this data in editable text fields. 

After you setup this up, log in as an Editor to test.

Note:  change the field names to match yours if they are different.

Hope this helps. Let me know if you have any questions.

Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By Twocans - March 24, 2015

Brilliant reply thank you very much .  Amazing how powerful the cms is.

Regards

K

By Toledoh - March 25, 2015

That's a great tip Damon!

Cheers,

Tim (toledoh.com.au)

By gkornbluth - March 25, 2015 - edited: March 25, 2015

Great idea Damon,

So elegant...

And a definite recipe for the CMSB Cookbook

Best,

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

By Deborah - March 28, 2015

Can't wait to try this one, Damon! I've been wanting to have this option for years!

Thank you.
~ Deborah