Assigning a layout to a single page

BindTuning themes are typically shipped with more that one page layout, for example including a home layout and an inner layout (other times more, other times less). 

Although in Orchard the selection of the layout is global and unique, there are ways of assigning layouts on a page-by-page basis.

Option #1
Applying the layout page-by-page using "Theme Editor"

Theme Editor module, by Rickard Magnusson, is one way to achieve this. It adds a drop-down box to your page content type, allowing you to switch between layouts, on a page-by-page basis:

To install the module go to Dashboard > Modules, tab Gallery, and search for "Theme Editor". Install the version according to your Orchard version.

After installed, proceed as follows to activate the page content type:

  1. Go to Dashboard > Content Definition > Content Types (or to Dashboard > Content > Content Types, for versions below 1.7)
  2. Search for Page
  3. Edit
  4. Click Add Parts
  5. Select Layout Selector
  6. Save

Now the module is set and we can change the layout of any page.

  1. Go back to Content Items tab
  2. Click edit the home page by clicking in Edit
  3. Scroll down to Layout drop-down box
  4. Select one of the layouts available in the theme
  5. Save or Publish Now the page

Option #2
Applying the layout page-by-page using "Orchard Layout Selector"

Orchard Layout Selector module is another way to achieve this. It also adds a drop-down box to your page content type.

http://layoutselector.codeplex.com/

After download, install the module at “Dashboard > Modules”, tab “Installed”, and upload the file by selecting "Install a module from your computer".

After installed, proceed as follows to activate the page content type:

  1. Go to “Dashboard > Content”, “Content Types” tab, search for “Page” and edit.
  2. Click “Add Parts” and select “Layout Selector” and click “Save
  3. Save” the Page settings

Now you can create or change the layout of a specific page.

Go to the Page that you want to change the layout, edit the page, scroll down to Layout drop-down box and select the desire layout.

 

Note: Don't use both modules at the same time, this may cause some issues.

Option #3
Automatically applying the home layout to the homepage

Another alternative is the usage of the module Designer Tools, which automatically applies the home layout to the homepage (it will not allow picking specific layouts in other pages): http://gallery.orchardproject.net/List/Modules/Orchard.Module.Orchard.DesignerTools

After installing this module choose the following options:

  • uncheck Shape Tracing
  • check Url Alternates
  • check Widget Alternates
Have more questions? Submit a request

Comments

  • Avatar
    Brian Leeton

    Another option is to add Theme Editor 1.44 module

  • Avatar
    Pedro Monte

    Thank you Brian, We'll update this article.

Got a question?

If you can't find the answer to your question, you can contact us.
We are here and happy to help.

Powered by Zendesk