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 Twocans - March 24, 2015

Hi yea,
I was trying to figure how best to approach.

I build a cms for my client and I am logged in as admin. My client logs in as editor.

I have the cms built so as I can add the page title and  metas, both keyword and description 

Now when my client logs in as an editor, I have it set so it is he or she who adds the content but not have access to the keywords thus.

I would like my client to see as text and not in a text area the keywords I have added for the metas.

I say this as when I analyse the keywords etc I would like the to use some or all of these keywords in the content, I want them to have these keywords in front of them as they type the content into the cms but I do not want them to change it. So I was wondering, since they are logged in as editor is there any way they only get to see this specific textarea as words on the page on top of their cms area.



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:

<td colspan='2'>

Change that to this:

<?php if (userSectionAccess($GLOBALS['tableName']) >= 9): ?>
<td> Page Title: </td>
<td><?php echo htmlencode(@$GLOBALS['RECORD']['page_title']); ?></td>
<td> Meta Tag: </td>
<td><?php echo htmlencode(@$GLOBALS['RECORD']['meta_tags']); ?></td>
<td> Meta Description: </td>
<td><?php echo htmlencode(@$GLOBALS['RECORD']['meta_description']); ?></td>
<?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.

Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.

By Twocans - March 24, 2015

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



By Toledoh - March 25, 2015

That's a great tip Damon!

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


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