This project is read-only.

Alternate for shape doesn't show anything

Topics: Customizing Orchard, General, Nederlands (Dutch)
Jul 26, 2013 at 8:54 AM
Hi all,

I downloaded the Custom Forms module from the Gallery. I'm now busy styling the forms to match my design.

I tried to create an alternate shape template for this shape:
When I look at the generated template, it is empty. So, I tried to copy the template code from the Custom Forms module template, but that didn't work. Apparently there is no way to create alternates for this shape.

Am I missing something and can this be achieved somehow?

Jul 27, 2013 at 6:06 AM
Why are you trying to do that? What exactly are you trying to do?
Jul 27, 2013 at 9:07 AM
If I place a Custom Form on a page, it is rendered the way I don't want.
For example: every input field is wrapped within a <fieldset />. I want to have some influence on this. There is no alternate shape I can create for this. How could I have influence on this?

Jul 27, 2013 at 9:17 AM
OK, how did it not work?
Jul 27, 2013 at 9:27 AM
If I click, create alternate, it generates the file inside my template, but it is empty. So it comes from the source.
I tried to look how the Display method in the driver created the shape and what the name is, but it uses a BuildEditor and I'm not familiar with that.
return ContentShape("Parts_CustomForm_Wrapper", () => {
                return shapeHelper.Parts_CustomForm_Wrapper()
So it seems that for every type of field it is rendering the shape dynamically. Is that a correct assumption?

Jul 27, 2013 at 10:34 PM
The shape by default is rendered by a shape method that you can find in CoreShapes.cs. You need to reproduce the work that that method does from your alternate template, and then add your modifications to that.
Jul 29, 2013 at 9:38 AM
Can you point me to which method that is? I think it is the EditorTemplate method, but I'm not sure.

Jul 29, 2013 at 11:34 PM
The one you mentioned yourself in your first message.
Aug 1, 2013 at 3:28 PM
I'm a bit lost with this topic. Not sure if I understand this.
Is it possible to create alternate shapes for the builtin Orchard Fields (Input, Text etc.)?

Aug 1, 2013 at 8:08 PM