Contents tagged with "Layout"

  • Hide Elements from Layout Part Orchard CMS

    Layout Part in Orchard CMS is a very powerful tool, but it is complicated for the end user (content editor), as you can see in this picture:

    Also the Dashboard sometimes can be complicated for a non-developer user. In almost every Orchard CMS Website I use in TheAdmin Theme a noadmin.css file. This file is called only when the user in not the Admin and hides things from the end user.

    Add the noadmin.css file in the Styles folder in the TheAdmin Theme. Add these line of code in the …

    Read More 
  • Responsive iFrame - Layout Snippet

    Layout Snippets it's one of my favourites features of Orchard. Orchard 1.10 provides parameterizable snippets, that are more powerful. In this post, I will create a responsive iFrame parameterizable snippet. iFrames are very useful to websites, for example, a YouTube video or a Google Map. You can get the HTML of an iFrame and you can post it to your website, but it will not be responsive. 

    First of all, we have to install Bootstrap to our website. After this, we will a create a cshtml file …

    Read More 
  • Authenticated User - Layout Snippet

    Snippets are Layout Elements that you can drag n drop into the layout canvas. You add them to the Views folder of your theme and they have to end with Snippet.cshtml. Layout Snippets it's one of my favourites features of Orchard.  

    In this Blog Post, I will show you how to make a Page only accessible for authenticated users. There are plenty of ways to do it but I will use the Layout Snippet way. 

    If a user is not Logged In the WorkContext.CurrentUser will be null. 

    We will a create a …

    Read More