Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove items from a page?

Tags:

orchardcms

I have just downloaded and installed Orchard CMS and started to play with it. Created some widgets in zones, and created a blog and customized my top menu.

Now I want to do some modifications for my welcome page.. I want to remove the title field and the line where created date is shown, only to show the body. (This will only be for the welcome page. The other pages should not be affected)

How do I do this? What is the right approach?

like image 585
Martin Avatar asked Mar 04 '11 14:03

Martin


People also ask

How do you remove an element from a page?

First, select the target element that you want to remove using DOM methods such as querySelector() . Then, select the parent element of the target element and use the removeChild() method.

How do I remove content from a site that I don't own?

So the first step to remove content that's hosted on a site you don't own is to contact the owner of the website and request that they remove or block the content in question.

How do you remove text from a website?

To remove text, use the concept of remove(). Use filter to get the content not inside element tag.

How do I remove something from my search results?

If content about you is no longer on the website that Google search results list, you can use the Remove outdated content tool to let us know and it will be removed from Google search results.

How do you delete something on pages on a Mac?

Delete a document Select the document, then do one of the following: Drag the document to the Trash icon in the Dock. Press Command-Delete on the keyboard.


2 Answers

I had the same desire to remove the published date. In my case I wanted to remove them from ALL pages.

One way to to do this is to adjust the Placement of Shapes...

The Shape you need to influence the placement of is the Parts_Common_Metadata shape. To make it invisible you make the placement value equal to 'Nowhere'.

So I added this to a placement.info file inside my theme folder:

<Match DisplayType="Detail">
    <Place Parts_Common_Body="Content:before"
           Parts_Tags_ShowTags="Content:after"
           Parts_Comments="Footer"
           Parts_Common_Metadata="Nowhere"/>
</Match>
<Match DisplayType="Summary">
    <Place Parts_Common_Body_Summary="Content"
           Parts_Comments_Count="Nowhere"
           Parts_Tags_ShowTags="Nowhere"
           Parts_Common_Metadata_Summary="Nowhere"
           Fields_Common_Text="Nowhere"/>
</Match>

If you want this to apply only to certain content types you can wrap the above within a parent tag such as:

<Match ContentType="Blog"></Match>

I'm not sure how you would apply this only to the Welcome page though...

like image 80
rohancragg Avatar answered Dec 07 '22 06:12

rohancragg


In case someone finds the response later and needs the mark up for removing the page title on the homepage, here it is:

<!-- Remove the page title from the homepage -->
<Match Path="~/">
    <Place Parts_Title="-" />
</Match>
like image 27
localman Avatar answered Dec 07 '22 04:12

localman