How to remove items from the page?

I just downloaded and installed Orchard CMS and started playing with it. Created several widgets in the zones, created a blog and set up my main menu.

Now I want to make some changes to my welcome page. I want to remove the header field and the line in which the creation date was shown, only to display the body. (This will only be for the welcome page. It should not be affected by other pages)

How can I do it? What is the right approach?

+6
orchardcms
source share
3 answers

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

One way to do this is to adjust the arrangement of the shapes ...

The form in which you need to influence the layout is the Parts_Common_Metadata form. To make it invisible, you make the placement value set to Nowhere.

So, I added this to the 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 types of content, you can wrap this in a parent tag, for example:

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

I'm not sure how you apply this only to the welcome page, though ...

+6
source share

If someone finds the answer later and needs a checkmark to remove the page name on the home page, here's what:

 <!-- Remove the page title from the homepage --> <Match Path="~/"> <Place Parts_Title="-" /> </Match> 
+6
source share

To edit the html / views itself, you must edit the cshtml files. I still have to get it right.

To simply edit the contents, in your dashboard:

  • Click "Widgets"
  • Click "Home under Layers"
  • Now you can add any widget to the level of the home page, and it will be displayed only on the main page.

You can add html widgets to make some custom stuff.

Hope this helped.

+1
source share

All Articles