Tobias Punke
Tobias Punke

Reputation: 750

Mixing content and widgets

I am new to Orchard and question myself how to mix up widgets and content. As of my understanding, the page content type has one layout where you put all your content in: HTML, images, et cetera. Where it will get displayed is defined by the theme. By placing widgets into the zones of the theme I can display custom modules in addition.

But, what if I want (for one specific page, from top to bottom)

Content/HTML -> Widget -> More Content/HTML -> Another Widget -> Even more Content/HTML?

I know it is possible to achieve that by placing the second and third content block into a widget and configure the layer to match the url of my page, but this seems to me like a hack.

In DNN you can place everything, HTML as well as modules, into the exact container/zone you want. In nasty Joomla! you can "import" modules (widgets) as part of the HTML of an article.

What is the way to achieve that mix up in Orchard?

Upvotes: 0

Views: 264

Answers (1)

rtpHarry
rtpHarry

Reputation: 13135

You have tagged the question as orchardcms-1.10 so you should be able to do it.

Orchard has a module called Orchard.Layouts which provides the functionality that you are describing.

Are you using an upgrade old version?

If you have upgraded your site from an older version of Orchard then it will still just have the old style BodyPart as its main content editor. Fresh installs will have LayoutPart which can provide these kinds of complex layouts.

For an introduction on this subject look at IDeliverable's Orchard Layouts intro article.

If you are working with an old upgraded version please add a comment and I will explain the upgrade process.

Have you enabled the Layout Widgets module / feature?

If you already see this but can't add the widgets then make sure you enable the Widget Elements feature:

Widget elements

Go to:

  1. Admin panel
  2. Modules
  3. Type widget into the filter at the top
  4. Click Enable on the Widget Elements feature

Now when you go back to the layout editor you will see a new category with all the widgets placeable as elements.

Upvotes: 2

Related Questions