Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Wihlborg Inge 21 posts 161 karma points
    Feb 09, 2017 @ 08:31
    Wihlborg Inge
    0

    Register form in Umazel Starter Kit Theme

    Hi, thanks for a great theme. As I am quite new to this theme I wonder what the best practice is for adding a register form in a site based on Umazel Starter Kit? BR Inge

  • Alex Skrypnyk 6150 posts 24110 karma points MVP 8x admin c-trib
    Feb 09, 2017 @ 20:56
    Alex Skrypnyk
    1

    Hi Inge

    I think the best way to start is to use standard Umbraco Register form. Look at "\Umbraco\PartialViewMacros\Templates\RegisterMember.cshtml"

    Its great example.

    Thanks,

    Alex

  • Sotiris Filippidis 286 posts 1501 karma points
    Feb 10, 2017 @ 13:50
    Sotiris Filippidis
    1

    Inge,

    if your question regards how to make that form another section on a content page (just like text or gallery sections), I can point out some things you may have to do. Otherwise you could implement it on a separate template following the example Alex mentioned.

  • Wihlborg Inge 21 posts 161 karma points
    Feb 10, 2017 @ 15:14
    Wihlborg Inge
    0

    Hi,

    First thanks to Alex Skrypnyk for a fast answer, I will certainly look at the example you mentioned.

    As a answer to Sotirris my first though was to make a sections so if you please could show me what to think about and point out a way i would be pleased.

    Hope you all get a nice weekend. BR Inge

  • Alex Skrypnyk 6150 posts 24110 karma points MVP 8x admin c-trib
    Feb 10, 2017 @ 17:13
    Alex Skrypnyk
    0

    Hi Inge

    Have a nice weekend too!!! We are helping with pleasure

    Alex

  • Sotiris Filippidis 286 posts 1501 karma points
    Feb 14, 2017 @ 08:23
    Sotiris Filippidis
    0

    In order to make a section with the login and the register form, I'd start by creating two document types, each for one form (assuming that there will be two sections - one for login and one for registration).

    See what compositions other section document types have and assign the same to your new doctypes.

    Find the "Sections Folder" document in Document Types and on Permissions allow the two new doctypes you created to be added as children. Then you can add those to any page.

    Then build the models DLL from the Developer section so you have access to strongly-typed models for your new doctypes (you may have to do this again should you add properties to those doctypes).

    Create two partial views for your two doctypes - or, controllers and partials, whatever you think fits.

    There is a file in /views/partials named PageSectionRenderer.cshtml. There you'll see that a partial view is invoked depending on the document type - add your two doctypes to the switch clause there invoking your newly-created partials. (Instead of a partial view, you may want to invoke a controller action here for login / registration).

    If all goes well, your partial or action resulting in a partial will be rendered when you have one of your new doctypes in a page. Go on an add the login or register document to a page under "Page Elements" (that is the "Sections Folder" doctype) and see where it gets you.

    You can also use NodeRestrict configuration to limit the number of login / register forms to 1 for each site root but I think I've confused you enough for a day :) It's complicated, I know, but you'll see that once you get the grasp of it it's pretty easy to extend the theme.

  • Wihlborg Inge 21 posts 161 karma points
    Feb 14, 2017 @ 15:43
    Wihlborg Inge
    0

    Hi Sotiris,

    Thanks for your answer, must say that it is a bit confusing :), I certainly will try to dive deeper in extending the theme but not now.

    I have started to add normal pages to the site without sections and in these pages I added a Html.Action Templates / Register

    It shows up right when looking at the page except styling, so now I wonder which Template is best to use in order to embed the Register on the site.

    BR Inge

  • Wihlborg Inge 21 posts 161 karma points
    Feb 15, 2017 @ 11:59
    Wihlborg Inge
    0

    Hi again Sotiris,

    I followed your description above and created a new section for MemberRegister, and then tried to include the section in a contentpage, that was the easy part.

    When I tried to run the application I get a error message that says that my model does not contain a definition of first name.Error message

    Please do you have any clue what this is about?

    Regards Inge

  • Wihlborg Inge 21 posts 161 karma points
    Feb 15, 2017 @ 12:58
    Wihlborg Inge
    0

    Here are more information in this topic it seems that I use wrong model type? enter image description here

Please Sign in or register to post replies

Write your reply to:

Draft