Allow or restrict the use of Code view by Contributor groups

Code view is a page view in Microsoft Office SharePoint Designer 2007 where you can view the code of a page in your site. With Code view, you can work with page elements directly in the code, in contrast to Design view, which is a WYSIWYG (what you see is what you get) user interface.

If you are a site manager using Contributor Settings who believes that your users need access to Code view in Office SharePoint Designer 2007, you should know what users are able to do when this option is allowed. This article explains what you need to know before you allow Contributor groups to use Code view to edit your site.

To learn more about Contributor Settings, see Introduction to Contributor Settings.

In this article

What are the Page views?

How does Code view affect the Contributor group settings?

Allow or restrict the use of Code view

What are the Page views?

Office SharePoint Designer 2007 has three different page views — Design view, Code view, and Split view. Design view provides a WYSIWYG user interface and is also the default view in Office SharePoint Designer 2007. Code view displays the code of a page, and Split view displays both the Design and the Code views arranged vertically. To change views, on the View menu, point to Page, and then click Design, Split, or Code. Or if you have a page open for editing, you can click the buttons at the bottom-left of the document window.

The Contributor setting to allow the use of Code view also applies to Split view. This means that a Contributor group can access Split view and Code view only if you allow a Contributor group to use Code view. Otherwise, that Contributor group can view and work with pages in your site only in Design view.

Top of Page

How does Code view affect the Contributor group settings?

Contributor mode is a limited access mode in Office SharePoint Designer 2007 in which commands and features are available to users only if the site manager has allowed the use of those features. A site manager creates Contributor groups and assigns them editing restrictions. However, if you select the option to allow a Contributor group to use Code view, some of the Contributor settings in the Editing, Formatting, Images, and SharePoint categories can be bypassed by users.

For example, if the site manager does not allow the Content Authors group to apply styles, but that group is allowed to use Code view, then users in the Content Authors group can still apply formatting to the page by adding HTML or CSS directly in Code view. Editing restrictions are not really "restrictions" until you also restrict the use of Code view for a Contributor group. Therefore, carefully consider the pros and cons before allowing a Contributor group to use Code view.

Most importantly, Code view allows users to make changes directly to the code. This makes it possible for inexperienced or novice users to make unwarranted changes to the page and even break the site by disrupting the code. If you do not want your users to bypass their editing restrictions by working directly with the code, make sure that you do not allow Contributor groups to use Code view.

By default, this option is not selected for any Contributor group that you create. You must choose to allow this option. Also by default, this option is not selected for the Content Authors Contributor group, because this group has limited access to features in Office SharePoint Designer 2007. But note that the Web Designers and Site Manager groups have unrestricted use of Office SharePoint Designer 2007 — this includes Code view.

Top of Page

Allow or restrict the use of Code view

A site manager can decide whether to allow or restrict the use of Code view for each individual Contributor group. For example, as a site manager you might be uncomfortable allowing the use of Code view to a large group of less experienced Web designers in your organization. You can restrict the use of Code view for that group and create another, smaller Contributor group that is composed only of users whom you trust not to break the site when working in Code view.

Note:  The option to allow or restrict the use of Code view also allows or restricts the use of the Quick Tag Editor, which you can use to quickly write and enter code in your page. To open the Quick Tag Editor, on the Edit menu, click Quick Tag Editor. Or you can press CTRL+Q.

Allow the use of Code view

You can allow the use of Code view in existing or new Contributor groups. By default, this option is not selected for any Contributor group that you create. You must choose to allow this option.

To learn how to create a Contributor group, see the article Create a Contributor group.

  1. Open your SharePoint site in Office SharePoint Designer 2007.

  2. On the Site menu, click Contributor Settings.

  3. Click a Contributor group, and then click Modify.

  4. In the Contributor Group Properties dialog box, select the Allow use of Code view check box, and then click OK.

    Code View option selected in Contributor Group Properties dialog box

    Note: This option is unavailable to Contributor groups who already have unrestricted access to Office SharePoint Designer 2007. To make this option available, clear the Allow unrestricted use of SharePoint Designer check box. When you clear this check box, all of the other options in the General category and the remaining categories in the Contributor Group Properties dialog box become available.

    Important: If you allow a Contributor group to use Code view, some of the editing restrictions that you set in the Editing, Formatting, Images, and SharePoint categories for this group can be bypassed by the users in this group. When you click these categories, a message informs you that the members of the group can bypass the editing restrictions specified in that category when Code view is allowed. If you think you have allowed Code view for this group by mistake, return to the General category and clear the Allow use of Code view check box.

    Code view warning in the Contributor Group Properties dialog box

Restrict the use of Code view

You can restrict the use of Code view for only those Contributor groups that have unique Contributor settings. This means that you cannot restrict the use of Code view for Contributor groups that already have unrestricted access to Office SharePoint Designer 2007 — for example, the default Web Designers and Site Manager groups. To restrict the use of Code view for such groups, do the following.

  1. Open your SharePoint site in Office SharePoint Designer 2007.

  2. On the Site menu, click Contributor Settings.

  3. Click a Contributor group, and then click Modify.

  4. In the Contributor Group Properties dialog box, clear the Allow unrestricted use of SharePoint Designer check box.

    When you clear this check box, all of the other options in the General category and the remaining categories in the Contributor Group Properties dialog box become available.

  5. Clear the Allow use of Code view check box.

    You can now create other unique Contributor settings for this group. For more information, see the article Create a Contributor group.

Top of Page

Share Facebook Facebook Twitter Twitter Email Email

Was this information helpful?

Great! Any other feedback?

How can we improve it?

Thank you for your feedback!

×