How to hide custom classes in Contribute
This TechNote presents instructions on how site administrators can limit the availability of custom classes in Contribute. In order to get a quick grasp of what this TechNote is all about, it is best that the user knows how to create Cascading Stylesheets (CSS) in Dreamweaver. We suggest the articles in "Dreamweaver Developer Center - CSS" to understand the concept of CSS-creation, and Using Cascading Style Sheets in Contribute (TechNote 16583) to understand how CSS styles are used in Contribute.
Background
Contribute users cannot create CSS files, but they can use the custom classes that have been linked to the page by the site administrator. Cascading Style Sheets (CSS) used in Contribute sites are normally created in Dreamweaver.
Custom classes are the only CSS styles available to Contribute users. Once the custom class is uploaded, it will be available in the Contribute Style drop-down menu where defined custom classes go, and can then be applied to elements in the web pages.
Site administrators may hide custom style classes in Contribute. Hidden custom classes will not appear in the Styles drop-down box of Contribute. You may either create a hidden custom class, or hide an existing custom class in Dreamweaver. To do this, add the prefix "mmhide_" to class names.
Older versions of Dreamweaver (Dreamweaver 4 and Dreamweaver MX) do not allow underscores in custom classes through any of the user interface elements (the New CSS Style dialog box or the Manage CSS Style dialog box). You will need to rename the style by hand in Dreamweaver's code view. This issue has been fixed in Dreamweaver MX 2004.
How to hide custom classes through Dreamweaver MX 2004
- Create a new custom class style in Dreamweaver. In the CSS style spanel (Window > CSS Styles), click the New Style button.
- In the New CSS style dialog box, name the custom style with the prefix "mmhide_" (without quotation marks).
For example, if you will be using a style named ".MyClass in a page", add the prefix "mmhide_" so that you would have the name ".mmhide_MyClass".
- Save the file. Upload the CSS file to the remote server.
How to hide custom classes through older versions of Dreamweaver (4 and MX)
When attempting to add the prefix "mmhide_" to class names in older versions of Dreamweaver, this message box appears:
In this case, you will have to rename the custom style by hand in Dreamweaver's code view.
- Create a new custom class style in Dreamweaver. In the CSS styles panel (Window > CSS Styles), click the New Style button.
- Name the custom class (without the "mmhide_" prefix).
- Open the CSS file in Dreamweaver's code view. The style code appears. Place the cursor right before the name of the custom class style.
- Insert the prefix "mmhide_" into the name of the custom class style.
- Save the file. Upload the CSS file to the remote server.
- Open the web pages that use the CSS style. Make sure to also change the name of CSS style in these files. Also do this in Dreamweaver's code view.
Additional information
To learn more about issues that exist between Contribute and CSS styles, please refer to the following TechNotes:
Hiding CSS from Contribute while editing (TechNote 18761)
Line spacing does not look correct in Contribute (TechNote 16627)
Embedded browser issues with Contribute for Macintosh (TechNote 18738)
This content requires Flash
To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.
Download the free Flash Player now!
