We have a Sitecore project and the code/files are from an ASP.NET web application.
The HTML for the products section is as follows
<div class="products-section">
<ul class="tabs">
<li>Product 1</li>
<li>Product 2</li>
</ul>
<div class="product">
<h3>Product Name</h3>
<img src="/images/img1.jpg" />
<span>Description</span>
</div>
</div>
This is how it works for an end user.
EU will click on a Product tab (eg: Product 1), which will change the content inside <div class="product">
, without postback.
For the author, this section must be editable from the Experience editor. Usually, I would use asp:Repeater
with sc:Text,sc:Image
to render it.
But, here the data has to be retrieved using ajax calls, which means no Repeater or Sitecore controls.
In such case, how can I make the content editable from Experience editor.
The only ideas I came up with:
Get data of all the products in
Page_Load
, bind it usingRepeater
and then usejQuery
to Show/Hide the respective divs. (doesn't seem a nice way though)Tell the content author, that this section can only be edited from Content editor and not from the experience editor :)
What are my options here.