ContentPart not displayed on AsideFirst Zone

Jan 26, 2011 at 5:09 PM

I created a module that contains a navigation menu content part.

The placement.info file looks like this:

<Placement>
    <Place Parts_LeftCategoryMenu="Content:1"/>
    <Place Parts_LeftCategoryMenu_Edit="Content:7"/>
</Placement>

Then, I added the content part to a content type page. When I create a new page, the navigation menu is displayed correctly on the page.

 

Now, I need this menu to be displayed on the AsideFirst zone. So, I changed the placement.info file to look like this:

<Placement>
    <Place Parts_LeftCategoryMenu="AsideFirst:1"/>
    <Place Parts_LeftCategoryMenu_Edit="Content:7"/>
</Placement>

 

As soon as I re-load the page, the navigation menu disappears. Why? How can I get my navigation menu content part to be displayed on the AsideFirst zone?

I have tried changing <Place Parts_LeftCategoryMenu="AsideFirst:1"/> to Header, BeforeContent and Featured but the menu won't show. The only way in which I can get it to display is setting the pace to Content.

What am I missing?

Thanks!

 

 

Coordinator
Jan 26, 2011 at 5:15 PM

The zones are actually hierarchical. The asideFirst zone exists at the layout level, and your placement here acts at the content level. I think you'll have to leave placement alone here and write a small bit of code that adds a shape to Layout().AsideFirst(). Or use a wdiget.

Coordinator
Jan 26, 2011 at 5:16 PM

Yeah, actually your scenario reads like a widget scenario...

Jan 26, 2011 at 5:32 PM

Bertrand - how would you do this for a part of the content type? For instance, I am trying to do what he's doing except I want to put my tags in a region I've named "Right". In doing so with the placement.info, it simply vanishes.

 

Coordinator
Jan 26, 2011 at 5:34 PM

Well, first you'd need a zone called "Right" to exist. Did you create that?

Jan 26, 2011 at 5:38 PM

Yep.. 

Jan 26, 2011 at 5:43 PM

Thanks for your quick answer.

This navigation menu I created is supposed to be display only on certain pages and its content varies depending on the page. Basically I had thought of creating different content types for every "Category Menu" page that the user wanted to create. For instance:

Content Type:

"Category Menu 1"

"Category Menu 2"

"Category Menu 3"

Then the user could create several content item of type "Category Menu 1" which would display the same menu. - but a different menu from "Category Menu 2". This way the user could reuse the menu every time a given content item was created.

(Hope i am making sense here)

Considering this previous scenario I just mentioned, do you still think it would be better to create a new Layer "Category Menu Page" and add a widget to the AsideFirst zone?, or would it be better to write a bit of code to add a shape to Layout().AsideFirst()?

Thanks again.

 

 

Coordinator
Jan 26, 2011 at 5:47 PM

Chance: where and how?

gadwy: yes, I would recommend you create a new layer and put your widget in there. If you need complex or custom rules about where that layer applies, you can write your own rules. There is an example of that here: http://orchardproject.net/gallery/Packages/Modules/Details/Tagged-layer-rule-1-0-0

Jan 26, 2011 at 5:55 PM

bertrand: its defined in my Theme.txt file & part of the Layout

Coordinator
Jan 26, 2011 at 6:02 PM

Then that's a global layout zone and you should use a bit of code to move that shape around.