Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Orchard CMS Custom Theme - Every page displaying Title and Date Stamp

I have created a Custom Theme. Every page is displaying the Title and a date stamp at the top.

I have found posts saying comment out 'Placement.info' in the Theme route - but this has no effect.

How can I remove both of these?

like image 584
niico Avatar asked Mar 24 '23 03:03

niico


1 Answers

You don't need to remove the parts, just hide them from display using the placement.info file. Common and Title parts are useful parts to include with a page. Particularly common part should be included with most content types as it stores information about when an item is modified, published etc.

The parts are displayed by default. To hide them you need to add to your theme's placement information to override and hide the parts' display shapes e.g. for the Page type:

<Placement>
  <Match ContentType="Page">
    <Match DisplayType="Detail">
      <Place Parts_Common_Metadata="-"/>
      <Place Parts_Title="-"/>
    </Match>
    <Match DisplayType="Summary">
      <Place Parts_Common_Metadata_Summary="-"/>
      <Place Parts_Title_Summary="-"/>
    </Match>
  </Match>
</Placement>

This hides the metadata and title for both detail and list views by putting them in the '-' zone. Because the '-' zone does not exist, the shapes are not displayed.

See these docs for more info on placement: http://docs.orchardproject.net/Documentation/Understanding-placement-info

like image 164
damoclarke Avatar answered May 16 '23 08:05

damoclarke