sitecore6 - sitecore: editframe -
i need utilize editframe allow front end user modify checkbox fields
i create new edit frame button , set fields want front end user edit. illustration : core db -> /sitecore/content/applications/webedit/edit frame buttons/(edit button folder)/(field editor button). in fields edited front end user, have set headline.
in sublayout, have code
<sc:editframe id="editfield" runat="server" buttons="/sitecore/content/applications/webedit/edit frame buttons/editfields"> <div id="whatyoumissed"> <asp:listview id="listview1" runat="server"> <layouttemplate> <ul style="list-style-type: none;" > <asp:placeholder runat="server" id="itemplaceholder"></asp:placeholder> </ul> </layouttemplate> <itemtemplate> <li style="float: left;margin-left:20px;"> <sc:fieldrenderer id="fieldrenderer2" runat="server" fieldname="headline" item="<%# container.dataitem sitecore.data.items.item %>" /> <br /> <sc:fieldrenderer id="fr3" runat="server" fieldname="cb" item="<%# container.dataitem sitecore.data.items.item %>" /> </li> </itemtemplate> </asp:listview> </div> </sc:editframe>
code behind
string querypath = "/bla/bla/bla/bla/bla/bla/bla/bla/bla"; var item = sc.context.database.getitem(querypath); var children = item.children; listview1.datasource = children; listview1.databind();
when click on edit frame in page editor, prompted box not have field (headline) me modify it. suggestion?
answer: have google abit of sitecore edit frame datasource , end link http://blog.jan.hebnes.dk/2011/12/using-sitecore-editframe-with.html
instead of using code behind shown martijn bos, modify code prev following.
<asp:listview id="listview1" runat="server"> <layouttemplate> <ul style="list-style-type: none;" > <asp:placeholder runat="server" id="itemplaceholder"></asp:placeholder> </ul> </layouttemplate> <itemtemplate> <sc:editframe id="editfield" runat="server" buttons="/sitecore/content/applications/webedit/edit frame buttons/editfields" datasource="<%# ((sitecore.data.items.item)container.dataitem).paths.fullpath %>" > <li style="float: left;margin-left:20px;"> <sc:fieldrenderer id="fieldrenderer2" runat="server" fieldname="headline" item="<%# container.dataitem sitecore.data.items.item %>" /> <br /> <sc:fieldrenderer id="fr3" runat="server" fieldname="cb" item="<%# container.dataitem sitecore.data.items.item %>" /> </li> </sc:editframe> </itemtemplate> </asp:listview>
have tried setting datassource of editframe?
e.g. editfield.datasource = item.paths.fullpath;
sitecore sitecore6 page-editor
No comments:
Post a Comment