Account Controller and 2 parts

Topics: Troubleshooting, Writing modules
Aug 2, 2011 at 10:10 AM

I have copied and edited the Extended User registration and i've built 2 different parts to extend this registration. The problem is that i want to show all three "parts" on my registration page but in different order.

In the Register action are my 2 custom parts build by : shape.UserProfile = _contentManager.BuildEditor(user);

The problem is that is first want to show my first custom part view, then the basic registration fields from the Register view and then my second part view.

Is it something like to fowlling possible?:

shape.FirstPart= _contentManager.BuildEditor<part1name>(user);

shape.SecondPart= _contentManager.BuildEditor<part2name>(user);

That way i can change the order. and split those built up editors

Coordinator
Aug 2, 2011 at 9:53 PM

Did you try placement.info?

Aug 25, 2011 at 1:08 PM

Hi,

I'm doing a similar thing. I want to create 2 different registration forms for 2 different types of users.

I will also copy/edit "Extended User registration module". My idea of solving this problem is this : 

1.) Create 2 new content parts, one for each user type

2.) Add custom fields to both of them

3.) Add both content parts to user content type

4.) Selectivly hide/show those two parts depending on the type of the registration form that is displayed

I'm a beginner in Orchard so I ask is this an appropriate way of solving my problem?

Thanks!

Coordinator
Aug 25, 2011 at 6:47 PM

Sure, sounds good. You could also have a single part and choose to display different shapes from the driver depending on the type of registration.