Skip to main content
improved spelling and formatting, including info from comments
Source Link
Bart Koopman
  • 29.6k
  • 3
  • 40
  • 90

Enable SiteEdit for Dynamic Component Fields in SdlSDL Tridion 2013

I am retrieving my dynamic componentComponent from brokerthe Broker and using its field in my view (cp view), to display content using DD4T and MVC4. Now, iI am facing difficulties while trying to setup SiteEdit for my dynamic managed content. I can not use the standard method where iI can pass my static CP (included in pagePage) as model to the method (SiteEditComponentPresentation) SiteEditComponentPresentation.

I am trying with the following method as well, but not able to:

public static MvcHtmlString SiteEditComponentPresentation(this HtmlHelper helper, IComponent component, string componentTemplateId, bool queryBased, string region);

In my case:   @Html.SiteEditComponentPresentation(Component, "tcm:xx-yyyy-32",true,"")

In my case: @Html.SiteEditComponentPresentation(Component, "tcm:xx-yyyy-32",true,"")

And then for each field: @Html.SiteEditField(Component, Component.Fields["fieldName"])

Can you please tell me what is wrong or what exact value iI should give in region  ? Is there any other way to work in similar scenarios? Any suggestion will help me.

update

ThanksThe particular section I am not able to edit is coming from an ajax call, inside a <div> the whole content of the dynamic view is getting populated in advancesomething like: <div id="divContent"></div>, where divContent is my dynamic HTML getting linked to my actual page.

In the dynamic view I am using a non-tridion model, but for your time and helpsome section I am calling the broker to retrieve Component where I need site-edit enabled.

Enable SiteEdit for Dynamic Component Fields in Sdl Tridion 2013

I am retrieving my dynamic component from broker and using its field in my view (cp view), to display content using DD4T and MVC4. Now, i am facing difficulties while trying to setup SiteEdit for my dynamic managed content. I can not use the standard method where i can pass my static CP (included in page) as model to the method (SiteEditComponentPresentation) .

I am trying with the following method as well, but not able to:

public static MvcHtmlString SiteEditComponentPresentation(this HtmlHelper helper, IComponent component, string componentTemplateId, bool queryBased, string region);

In my case:   @Html.SiteEditComponentPresentation(Component, "tcm:xx-yyyy-32",true,"")

And then for each field: @Html.SiteEditField(Component, Component.Fields["fieldName"])

Can you please tell me what is wrong or what exact value i should give in region  ? Is there any other way to work in similar scenarios? Any suggestion will help me.

Thanks in advance for your time and help.

Enable SiteEdit for Dynamic Component Fields in SDL Tridion 2013

I am retrieving my dynamic Component from the Broker and using its field in my view (cp view), to display content using DD4T and MVC4. Now, I am facing difficulties while trying to setup SiteEdit for my dynamic managed content. I can not use the standard method where I can pass my static CP (included in Page) as model to the method SiteEditComponentPresentation.

I am trying with the following method as well, but not able to:

public static MvcHtmlString SiteEditComponentPresentation(this HtmlHelper helper, IComponent component, string componentTemplateId, bool queryBased, string region);

In my case: @Html.SiteEditComponentPresentation(Component, "tcm:xx-yyyy-32",true,"")

And then for each field: @Html.SiteEditField(Component, Component.Fields["fieldName"])

Can you please tell me what is wrong or what exact value I should give in region? Is there any other way to work in similar scenarios? Any suggestion will help me.

update

The particular section I am not able to edit is coming from an ajax call, inside a <div> the whole content of the dynamic view is getting populated in something like: <div id="divContent"></div>, where divContent is my dynamic HTML getting linked to my actual page.

In the dynamic view I am using a non-tridion model, but for some section I am calling the broker to retrieve Component where I need site-edit enabled.

Tweeted twitter.com/#!/StackTridion/status/506811666211024896
Source Link
Anupam Baksi
  • 1.7k
  • 8
  • 23

Enable SiteEdit for Dynamic Component Fields in Sdl Tridion 2013

I am retrieving my dynamic component from broker and using its field in my view (cp view), to display content using DD4T and MVC4. Now, i am facing difficulties while trying to setup SiteEdit for my dynamic managed content. I can not use the standard method where i can pass my static CP (included in page) as model to the method (SiteEditComponentPresentation) .

I am trying with the following method as well, but not able to:

public static MvcHtmlString SiteEditComponentPresentation(this HtmlHelper helper, IComponent component, string componentTemplateId, bool queryBased, string region);

In my case:   @Html.SiteEditComponentPresentation(Component, "tcm:xx-yyyy-32",true,"")

And then for each field: @Html.SiteEditField(Component, Component.Fields["fieldName"])

Can you please tell me what is wrong or what exact value i should give in region ? Is there any other way to work in similar scenarios? Any suggestion will help me.

Thanks in advance for your time and help.