create transformation for this HTML

hadi tag asked on June 29, 2015 13:11

hi,

how to create a transformation for this HTML code:

<div class="center_RightBox">


        <div class="box3">
        <div class="box3_Header">
        <div class="box3_HeaderRight"></div>
        <div class="box3_HeaderLeft">System</div>
        <div class="archiveIcon"><img src="images/archive.png"/></div>                
        </div>
        <div class="box3_Data" style="height: 140px;">


       <div class="tabRight">
            <div class="tabmenu" id="tab1"><img src="images/bso2.jpg">BB1</div>
            <div class="tabmenu" id="tab2"><img src="images/bso2.jpg">BB2</div>
            <div class="tabmenu" id="tab3"><img src="images/bso2.jpg">BB3</div>
        </div>

        <div class="tabLeft">
            <div align="center" class="tabcontent" id="tab1c">
            <img src="images/testImg2.jpg">
            </div>
            <div align="center" class="tabcontent" id="tab2c">
            <img src="images/testImg2.jpg">
            </div>
            <div align="center" class="tabcontent" id="tab3c">
            <img src="images/testImg2.jpg">
            </div>
        </div>   


        </div>

        <!-- End box3_Data -->
        </div>


        </div>
 <!-- End center_RightBox -->  

Recent Answers


hadi tag answered on June 29, 2015 13:27 (last edited on June 29, 2015 15:39)

i create a transformation with this code :

<%# (DataItemIndex.ToString() == "0") ? "<div class='tabRight'>" : null %>

<%# (DataItemIndex.ToString() == "0") ? "

<img src='images/bso2.jpg' >" + LimitLength(Eval("NewsTitle"), 64) + "
" : null %> <%# (DataItemIndex.ToString() == "1") ? "
<img src='images/bso2.jpg' >" + LimitLength(Eval("NewsTitle"), 64) + "
" : null %> <%# (DataItemIndex.ToString() == "2") ? "
<img src='images/bso2.jpg' >" + LimitLength(Eval("NewsTitle"), 64) + "
" : null %> <%# (DataItemIndex.ToString() == "2" || (DataItemIndex == DataItemCount - 1)) ? "" : null %>

<%# (DataItemIndex.ToString() == "0") ? "

" : null %> <%# (DataItemIndex.ToString() == "0") ? "
<img src='" + GetFileUrl("MainTitrImage") + "' >
" : null %> <%# (DataItemIndex.ToString() == "1") ? "
<img src='" + GetFileUrl("MainTitrImage") + "' >
" : null %> <%# (DataItemIndex.ToString() == "2") ? "
<img src='" + GetFileUrl("MainTitrImage") + "' >
" : null %> <%# (DataItemIndex.ToString() == "2") ? "
" : null %>

but not work

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on June 29, 2015 15:18 (last edited on June 29, 2015 17:19)

Depends on how your content is setup. If it is all one page type then what you suggested works. Another option would be to put the content in different page types and use a Hierarchical Viewer.

0 votesVote for this answer Mark as a Correct answer

Dawid Jachnik answered on June 29, 2015 15:40

Hello,

You can use one data source web part for example PagesDataSource, which retrives the data from database. Then display it by two basic repeaters: one for tabRight, second one for tabLeft

2 votesVote for this answer Mark as a Correct answer

hadi tag answered on June 29, 2015 15:41

yes, it is all one page type

but that transformation do not work for my repeater...!!!!

0 votesVote for this answer Mark as a Correct answer

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