Placement of custom content type items

Jan 26, 2011 at 4:56 AM

I've created a custom type and am trying to create a placement.info file to place at the root of the theme, but I'm not sure how to refer to the custom fields.  The tutorial link (http://www.orchardproject.net/docs/Creating-lists.ashx?HL=position) conveniently (!) only shows placement of fields associated with the parts.

In my content type I have several text fields.  How do I refer to them?  I can refer to my hyperlink field by type since there's only one, but I want finer control over my text fields.

Thanks!

 

Coordinator
Jan 26, 2011 at 5:17 AM

Look at http://orchard.codeplex.com/workitem/16915

You can add a double underscore and the name of the field after the usual text field qualifier.

Jan 26, 2011 at 5:28 AM

Exactly it!  I used Fields_Common_Text_Published to get to my custom field "Published" in my content type.

Thanks!

Feb 25, 2011 at 8:04 AM

I guess I must be missing something regarding referencing a custom field for a custom type in placement.info.

It looks like you are saying that for me to hide the EventDate for an Event in placement.info in a listing that the syntax is

 <Placement>

<Match ContentType="Event">

<Match DisplayType="Summary">

<Place Fields_Common_DateTimeField_EventDate="Nowhere"/>

 

</Match>

</Match>



</Placement>

This does not work. Is this still broken?

 

Regards,

 

Tim

Coordinator
Mar 1, 2011 at 12:16 AM

Yes, see http://orchard.codeplex.com/workitem/17320