Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove Sign in Link in Orchard Footer

Tags:

orchardcms

I want to remove the sign in link in the very bottom footer of my Orchard site. I want to go to the link /Users/Account/LogOn to login and not have the link displayed. I don't think its necessary on a public facing site and shouldn't be there.

I can only seem to remove or edit the regular footer. Does anyone know how I can do this?

EDIT - I'd also like to be able to remove the publish date from the content. I don't need the date published to be displayed on a simple about page. Does this functionality exist, is it not intuitive to fix.... or am I just a bit slow.

like image 625
big_tommy_7bb Avatar asked Mar 17 '11 22:03

big_tommy_7bb


3 Answers

I managed to remove the sign in link in a semi-friendly fashion:

  1. Find Orchard\src\Orchard.Web\Core\Shapes\Views\User.cshtml
  2. Copy it to the \Views\ directory of the theme you are using
  3. Remove the else portion of the branch statement so that it just reads as below.

Hope that helps...

if (Request.IsAuthenticated) {
     ... blah ...
}
like image 148
Richard Slater Avatar answered Dec 21 '22 23:12

Richard Slater


if you are using Contoso ot TheThemeMachine you can go to the layout.cshtml and remove following line

WorkContext.Layout.Footer.Add(New.User(), "10"); // Login and dashboard links

That line is responsible for injecting user part into the page

like image 35
Ivan Pavlović Avatar answered Dec 22 '22 00:12

Ivan Pavlović


If you are using TheThemeMachine theme, modify the BadgeOfHonor.cshtml in the views directory to modify the footer. To remove the publish date you need to add:

<placement>
  <Match ContentType="Page">
      <Match DisplayType="Summary">
        <Place Parts_Common_Metadata="-"/>
      </Match>
      <Match DisplayType="Detail">
        <Place Parts_Common_Metadata="-"/>
      </Match>
    </Match>
</placement>

to the Placement.info file, if you do not have one yet, you create one in the root of your theme directory.

like image 35
Matt Heffernan Avatar answered Dec 22 '22 01:12

Matt Heffernan