This project is read-only.

Struggling to get started putting a content item part in a zone

Topics: Core
Feb 21, 2014 at 12:16 AM
Hi there, I have read a few things on the board to try and put a content item I have created into a global zone on the theme machine page but just cant get this to work and just need a steer in the right direction if somebody doesn't mind helping me.

I have installed orchard and created a new content Definition called Test (I know very imaginiative)
and added a body part to this type.

I then create a content item of type test and add some text to the body.

I then have modified my file to read like so:
    <Match ContentType="Test">
       <Place Parts_Common_Body="/Header:1" />
I have also tried changing the place to say just <Place Body="/Header:1" /> but no matter what I cannot see the item in the header. I have published the item but don't see anything. I know i'm missing something but can't figure out what.

I don't have a template to render test so wonder if this is why i'm not seeing anything.

sorry for the lame question and i have tried what people are saying in some of the threads but I need help. As far asI can make out people have written a new content part but I was just trying to use some of that core parts already in Orchard.

Feb 21, 2014 at 12:35 PM
Please try if this works:
<Place Parts_Common_Body="Header:1" />
I haven't yet seen a leading slash in a placement file.
Feb 21, 2014 at 3:11 PM
Hi Oliver,

The leading slash is to target a global zone rather than a local one. I tried to get it working without a leading slash to see if it would just appear but still no luck im afraid.
Feb 21, 2014 at 10:16 PM

I have now tried to place the part of an existing item (a page and it works as expected, so now my placementinfo looks like:

<Match ContentType="Page">
   <Place Parts_Title="/Header:1" />

<Match ContentType="MyTestType">
   <Place Parts_Title="/Header:1" />

the Title of page appears in the header and my new type does not. My new content item does not appear at all no matter what I try