Adding a breadcrumb in a recipe

Topics: Administration, Installing Orchard
Aug 9, 2012 at 9:45 AM
Edited Aug 9, 2012 at 9:46 AM

Hi,

Using Orchard 1.5.1.0, I would like to have a breadcrumb menuwidget be created by a recipe. I am trying to do that like this:

<Data>
   <MenuWidget Id="/Identifier=MenuWidget2" Status="Published">
      <CommonPart Owner="/User.UserName=admin" Container="/Layer.LayerName=Default" />
      <IdentityPart Identifier="MenuWidget2" />
      <WidgetPart Title="Breadcrumb Widget" Position="20" Zone="BeforeMain" RenderTitle="false" />
      <MenuWidgetPart Menu="/name=Main Menu" StartLevel="1" Levels="0" Breadcrumb="true" AddHomePage="true" AddCurrentPage="true" />
   </MenuWidget>
</Data>

The menuwidget is created and the "Display as Breadcrumb" option is checked, but the "Add the home page as the first element" and "Add the current content item as the last element" options are not checked. Why not? Am I not using the correct attribute names for these options? AddHomePage and AddCurrentPage is how they are called in the MenuWidgetPart class...

Any help is appreciated!

Thanks, Wouter

Developer
Aug 9, 2012 at 6:14 PM

Maybe try and see how the XML looks like when using the Export feature. 

Aug 10, 2012 at 8:00 AM

Thanks for your reply. the xml looks like above, but without the AddHomePage and AddCurrentPage attributes.

Apparently these two properties are not being imported and exported. I submitted an issue about this: http://orchard.codeplex.com/workitem/18915.