Hi all,
I'm approaching Orchard for the first time, what I'd like to achieve is: - Create a "Section" module to define the concept of "sections"; - Being able to have an admin area for sections; - Being able to "attach" created sections to Orchard main menu; - Being able within the site template to take decisions based on the current section; Currently I've defined my "Section Module", the module is build and is running in Orchard. I have an admin menu within the Dashboard and from the AdminController I'm trying to list all the sections. What I've not understood is the difference between these approaches: var data = this.repository.Table.ToList(); var allSections = this.contentManager.Query<SectionPart, SectionRecord>().List(); if I manually add some rows to the database the first approach works fine but the second one returns no data. On the other side in order to create a "new" section I'm doing this: var section = this.services.ContentManager.New<SectionPart>( typeof( SectionPart ).Name ); but what I obtain is an "invalid cast exception". I'm taking as an example the "Orchard.Chapter" module, my Orchard version is 0.8.51. Thanks in advance, .m ___________________________________ Mauro Servienti | Microsoft MVP - Visual C# MCTS /MCPD- | IM: [email protected]
smime.p7s
Description: S/MIME cryptographic signature
--- You are currently subscribed to orchard-discuss as: [email protected]. To unsubscribe send a blank email to [email protected]
