ContentPart Record and Import/Export Module

Topics: General
Jan 3, 2012 at 8:43 PM

I've site running in Orchard 1.3 release version with my own modules and theme.. Ran Import/Export module to export recipes and had few questions…  

  • Why Feature and Command isn’t included in exported recipe file?
  • I selected Data and MetaData option while exporting recipe but not seeing any data exported for my widget contentpart record? 
Coordinator
Jan 4, 2012 at 12:06 AM

Feature and Command? What do you mean?

Did you also check your widget type? Does your part implement the import and export overrides?

Jan 4, 2012 at 2:20 AM

Based on this documentation http://docs.orchardproject.net/Documentation/Making-a-Web-Site-Recipe, Feature and Command configuration is part of recipe xml file. My site has number of Feature enabled and have layers, menu and widgets. Shouldn't both the section (Feature and Command) included in exported file?

Yes, I check my widget type. Let me verify overrides.

Coordinator
Jan 6, 2012 at 7:49 AM

Those recipe commands are manually added. Export won't do that.

Jan 25, 2012 at 10:35 PM

One more question.. My widget contains part which is meta data for widget. I can set that up while adding widget from admin console. if i am creating my widget using command in recipe, how do i set value for part data? Do I need to provide defaults in widget implementation?

<Command>           

page create /Title:"Foo" /Path:"Foo" /Homepage:true /Publish:true     

layer create Foo /LayerRule:"url '~/Foo'"

widget create FooWidget /Zone:"AFirst" /Position:"1" /Layer:"Foo"

</Command>

 

Jan 25, 2012 at 11:20 PM

To set properties on a custom part you'll have to write your own command (for examples see WidgetCommands in Orchard.Widgets\Commands which implements the default "widget create" command).

Jan 26, 2012 at 12:56 AM
Ok. What if I am building site on dev box and configure widget and televant content part. Then run export/import to output file. This step should include part data. do I still need to write widget create command in recipe for my widget?

On Jan 25, 2012, at 5:20 PM, "randompete" <notifications@codeplex.com> wrote:

From: randompete

To set properties on a custom part you'll have to write your own command (for examples see WidgetCommands in Orchard.Widgets\Commands which implements the default "widget create" command).

Jan 26, 2012 at 1:42 AM

No, the XML export contains all the part data, well as long as you implemented the Import/Export overrides in your ContentPartDriver.