A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

custom property edit in view mode

Vote:
 

Hi there!

I want to be able to edit page propertys by code since we dont want users to have access to the edit view in the CMS. I have so far created this button:

public void EditButtonClick(object sender, EventArgs e)
{
    editMode                        = true;
    description.EditMode       = true;
    mobilePhone.EditMode    = true;
    mainPhone.EditMode      = true;
    firstName.EditMode        = true;
    lastName.EditMode         = true;
    email.EditMode               = true;

    Page.DataBind();
}

were description is an episerver property etc..

so whenever a user clicks in the editbutton his or hers property fields gets editable in view mode. However I do not know how I can store these edited propertys in the database.

I want to use a save button. I have tried with everything but the propertys seems to be read only.. :/

any ideas?

than you!

 

#52355
Jul 19, 2011 16:47
Vote:
 

Hi Mathias

Have you considered using Quick Publishing for this? See Smooth Publish Using JQuery and EPiServer Quick Publishing.

Hope this helps.

Frederik

#52366
Jul 20, 2011 8:44
Vote:
 

thx! It sure did, not quite what I was looking for but still good :) I have succesfully established a link to the quidkedit mode from my profile. However when I remove the right to enter the CMS I need to logon as an administrator to enter the CMS (ordinary user does not hag access to the CMS)

 

I have added this location input to my webconfig without success:

 

<location path="EPiServer/CMS/edit/EditPanel">
    <system.web>
      <authorization>
        <allow roles="WebAdmins, Administrators, IteraUser"/>
        <deny users="*" />
      </authorization>
    </system.web>
  </location>

 

How do I give a user rights to enter the editpanel??

#52371
Jul 20, 2011 11:15
Vote:
 

I believe they need access to edit mode so that they can access EditPanel. See this thread for more information: http://world.episerver.com/Modules/Forum/Pages/Thread.aspx?id=52327&epslanguage=en.

Frederik

#52372
Jul 20, 2011 11:20
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.