Page Event Button In Members Sectio (editmember.aspx)
Having trouble getting a custom button (page event) on a members profile.
Looking at the umbraco source, it looks like the menu appears in the "m_MemberShipPanel" UmbracoPanel, but for the life of me I cant seem to get it working.
namespace MemberEvent { public class PageEvent : ApplicationBase {
public PageEvent(){ umbraco.presentation.masterpages.umbracoPage.Load += new MasterPageLoadHandler(umbracoPage_Load); }
Page Event Button In Members Sectio (editmember.aspx)
Having trouble getting a custom button (page event) on a members profile.
Looking at the umbraco source, it looks like the menu appears in the "m_MemberShipPanel" UmbracoPanel, but for the life of me I cant seem to get it working.
namespace MemberEvent
{
public class PageEvent : ApplicationBase
{
public PageEvent(){
umbraco.presentation.masterpages.umbracoPage.Load += new MasterPageLoadHandler(umbracoPage_Load);
}
void umbracoPage_Load(object sender, EventArgs e)
{
umbracoPage up = (umbracoPage)sender;
string path = up.Page.Request.Path.ToLower().Replace((umbraco.GlobalSettings.Path + "/").ToLower(), "");
if (path.Contains("members/EditMember.aspx"))
{
ContentPlaceHolder cph = (ContentPlaceHolder)up.FindControl("body");
PlaceHolder c2 = (PlaceHolder)cph.FindControl("plc");
UmbracoPanel mpl = (UmbracoPanel)c2.FindControl("m_MemberShipPanel");
if (mpl != null)
{
string key = HttpContext.Current.Request.QueryString["id"];
ImageButton dependencies = mpl.Menu.NewImageButton();
dependencies.ImageUrl = umbraco.GlobalSettings.Path + "/images/editor/forecolor.gif";
dependencies.OnClientClick = "alert('Current member is : " + key + "'); return false;";
}
}
}
}
}
Managed to get it working in the end :-)
is working on a reply...