How to hide selectively a page's description
in case you don't want people to see the description on specific pages
It's a good idea to include in the Description field a short summary of what's in a Page ("Document"). Sometimes, though, that description clutters up the look of the page. Here is what I think is the best way to hide the description on a per-page basis.
If you want to hide the description field on *all* pages of your site, you could resort to CSS.
In ZMI, go to portal_skins, find "document_view", customize it.
Navigate up one level to the portal_skins/custom folder. Rename your new document_view to something like "document_no_description_view". Then edit the view template: remove the <p> tag that shows the Description field. See below for what the resulting template should look like. You should also set the title of the view to something meaningful like "hide the description".
Next, in ZMI, go to portal_types, choose Document. In the "available view methods" property, add a line containing "document_no_description_view", then press Save.
Now back in your normal view of the Plone site, when you are on a Page ("Document"), use the Display drop down menu and choose the view "hide the description".
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
lang="en"
metal:use-macro="here/main_template/macros/master"
i18n:domain="plone">
<body>
<metal:main fill-slot="main">
<tal:main-macro metal:define-macro="main"
tal:define="kssClassesView context/@@kss_field_decorator_view;
getKssClasses nocall:kssClassesView/getKssClassesInlineEditable;
templateId template/getId;
text here/getText;">
<div tal:replace="structure provider:plone.abovecontenttitle" />
<h1 class="documentFirstHeading">
<metal:field use-macro="python:here.widget('title', mode='view')">
Title
</metal:field>
</h1>
<div tal:replace="structure provider:plone.belowcontenttitle" />
<div tal:replace="structure provider:plone.abovecontentbody" />
<p tal:condition="python: not text and is_editable"
i18n:translate="no_body_text"
class="discreet">
This item does not have any body text, click the edit tab to change it.
</p>
<metal:field use-macro="python:here.widget('text', mode='view')">
Body text
</metal:field>
<div metal:use-macro="here/document_relateditems/macros/relatedItems">
show related items if they exist
</div>
<div tal:replace="structure provider:plone.belowcontentbody" />
</tal:main-macro>
</metal:main>
</body>
</html>











