AccordionTabRepeater Show/Hide Anchor to Title

L Younkins asked on April 27, 2022 15:56

I have a page with show/hides as part of an Accordion Tab Repeater written by a previous developer. There are two transformations associated with these tabs. One is the Menu, and one is the content. This is a heavily used page for a college, so I do not want to re-write it completely, but just edit the existing transformation to create an anchor tag that links to the title of each show/hide. I added a field called "Anchor" to the page type of the menu. How can I incorporate this into the transformation, so that an anchor could be added to each menu? This is the page: https://www.frederick.edu/admissions.aspx

Here is the code for the menu and for the content.
**AccordionTabRepeater-Menu**

    <li>
    <a href="#tab-<%# DataItemIndex+1 %>-<%# Container.Parent.Parent.ClientID %>" title="<%# Eval("Title") %>">
      <span class="tab-item-title"><%# Eval("Title") %></span>
      <span class="ui-icon"></span>
      <%# String.IsNullOrEmpty(Eval<string>("MainText")) ? "" : "<div class=\"tab-item-subtitle\">" + Eval("MainText") + "</div>" %>
    </a>
    </li>
    <br/>

**AccordionTabRepeater-Content**

    <div class="tab-panel-counter-increment"></div>
    <div id="tab-<%# DataItemIndex+1 %>-<%# Container.Parent.Parent.ClientID %>">
      <h3 class="tab-panel-title"><%# Eval("Title") %></h3>
      <div class="tab-panel-content">
        <%# Eval("DetailedText")%>
      </div>
    </div>

   Please, sign in to be able to submit a new answer.