Copied to clipboard

Flag this post as spam?

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


  • Tom Allen 50 posts 71 karma points
    Nov 04, 2011 @ 17:35
    Tom Allen
    0

    Modifying existing back-office pages (ViewMember.aspx)

    Hi,

    I want to modify the ViewMember.aspx page, which lists members login, email and provides a delete button. I want to add columns for the firstName and surname properties which I've defined, for ease of use to my client.

    However, the codebehind is compiled in the Umbraco core, and I'm not sure how to override it. I can add a src attribute to the .aspx page and copy the source code into a codebehind file to be compiled dynamically, but the result is missing a load of references to core namespaces and properties.

    Any advice appreciated!

    Tom

  • Tom Allen 50 posts 71 karma points
    Nov 05, 2011 @ 16:48
    Tom Allen
    0

    Any assistance with this would be appreciated. I'm a bit stuck on where to start.

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Nov 07, 2011 @ 12:45
    Tim
    1

    You essentially have two options!

    The first, is to download the source, modify the page and recompile and use the new files on the site. This will work fine, but be aware that if you ever want to upgrade the site, your change will be lost, and you'll have to re-apply the changes.

    The second option is to use the umbraco events model to add the extra information to the page. This will make your code more re-usable, as should be able to upgrade the site and still have your code work as well. There's not a lot of examples of this online that I can find (may write a blog post about it at some point, as it's really useful). It is covered in the Umbraco Guide book that you can buy and in the Level 2 course, there may also be some videos on it on umbraco.tv.

    The basics of what you need to do are:

    Create a class that uses AppBase to register an event user to the umbraco cms page load event, check if you're on the member view page, and if so, add some extra controls to the page with the first and last name in (probably just Literal controls as it sounds like you just want to display the information).

    Hope that gives you an idea of how to get started!

    :)

  • Tom Allen 50 posts 71 karma points
    Nov 10, 2011 @ 09:06
    Tom Allen
    0

    Very useful, Tim - thank you. I think the first option will be more suitable.

Please Sign in or register to post replies

Write your reply to:

Draft