Combining or nesting shapes

Topics: Troubleshooting
Sep 19, 2013 at 2:48 PM
Edited Sep 19, 2013 at 2:53 PM
I asked a question about nesting a particular module earlier this week, but the more I tinker with it the more I think I need to broaden my question.

If I have two widgets, or content and a widget, in the same zone, how do I go about combining or nesting them (in an accordion, tab, etc)?
  • Do I create an alternate shape for each, and then simply copy the Template of one to the other?
  • Do I make an alternate shape for the entire zone, and then use razor code to display each content or widget shape cshtml file?
  • Do I just copy the HTML from each shape?
Coordinator
Sep 19, 2013 at 7:55 PM
Not sure I'm following exactly what you're trying to do, but alternating the zone looks like the right thing to do, unless you can achieve the effect you need with just CSS and some script. Not sure why the default zone rendering wouldn't work for that.
Sep 19, 2013 at 10:08 PM
Edited Sep 19, 2013 at 10:09 PM
To clarify, I have a page with content. I also have added a form widget to that particular page's the Content Zone. I'm looking to nest the form widget into the page's content via an accordion.

I've discovered how to create an alternate shape for the widget, and then just add the pages' content to that widget's alternate shape. It achieves the desired effect, but the page is really only edible through webmatrix.

How can I reverse this, so I can edit the page via the admin and not web matrix/the widget's alternate cshtml file? What code or script would I use to include the Widget's alernate cshtml file into the page's alternate cshtml file?
Coordinator
Sep 20, 2013 at 1:57 AM
I'm not sure I understand. Seems like the simplest way would be to use a plain html text field, and use bullet points inside of that. Then have the accordion script target that list.
Sep 20, 2013 at 2:52 PM
Edited Sep 20, 2013 at 2:58 PM
Thanks for responding!

So, I should not be attempting to create an alternate shape for the oForm Widget Module, and then on the Content Page's cshtml file, under the particular accordion div class attempt, @RenderPage(~/path) ?

(FWIW, when I attempt "@RenderPage("~/Themes/Raptor.Ericka/Views/Parts.OForm.Display-OForm-url-contact-us-form.cshtml") ", I always get an "Object reference not set to an instance of an object." error, "formAttributes.Add("id", form.Name);")

Then how I can I target the Form Module (or any module) in plain HTML?
Sep 20, 2013 at 3:35 PM
If you are using the OForm module from the gallery, beginning with Orchard I got so many problems with it (after paying a paypal right.....) that I gave up for using orchard forms and later writing my own module for this....
Sep 20, 2013 at 4:01 PM
Yeah? Hmm. What's the name/link? of your module
Sep 20, 2013 at 4:09 PM
Are you the author ? :)
Sep 20, 2013 at 4:11 PM
No; so I'm to take that as meaning it's not available on the gallery?
Sep 20, 2013 at 4:14 PM
Edited Sep 20, 2013 at 4:14 PM
this is my module, but not built for any usage, but mine
https://bitbucket.org/csurieux/datwendo.contact-for-orchard