Go back to mobile site

 

Please note: The forums are currently intended for Kentico community. Although we monitor them time to time, we cannot guarantee a timely response. If you need a help with Kentico CMS, please feel free to send your message to support@kentico.com.

If you want to add new post or reply to post, please sign in.

Search: 

Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > nested repeater - contentBefore, container View modes: 
User avatar
Member
Member
eagleag - 6/18/2012 6:25:45 AM
     
nested repeater - contentBefore, container
Hi,

I'm using nested repeater and want to add contentBefore or choose container.

This is tired to do: (but properties not public)

<cms:CMSRepeater
ID="repeater_clients"
runat="server"
OrderBy="NodeOrder"
ClassNames="bla.BlaItem"
TransformationName="bla.BlaItem.test"
Path="./%"
TopN="10"
ContentBefore="<div id='container' class='clientSays'><div id='example'><div id='slides'>"
ContentAfter="</div></div></div></div>"
SelectOnlyPublished="true" />


So what I did insted is-> add code to transformation bla.BlaItem.test.
This is code: (it works, BUT I THINK THERE MIGHT BE BETTER WAY TO CO THIS????)

<%# DataItemIndex ==0?"<div id='container'>":"" %>
<div class="block">
<p><%# Eval("test") %>
</div>
<%# DataItemIndex==DataRowView.DataView.Count-1?"</div>":"" %>


Please advise if my solution was best way to solve the issue?

Thanks :)

User avatar
Member
Member
Petr Dvorak - 6/18/2012 4:38:37 PM
     
RE:nested repeater - contentBefore, container
Hi,

try to use elements HeaderTemplate and FooterTemplate as shown in docs -- http://devnet.kentico.com/docs/controls/index.html?cmsuniview_getting_started.htm or in this first post


User avatar
Kentico
Kentico
kentico_janh - 6/19/2012 1:45:08 AM
     
RE:nested repeater - contentBefore, container
Hello,

You can just add any HTML content before and after the nested repeater right in the main repeater's transformation:

<HTML content before>

<cms:CMSRepeater />

<HTML content after>


Best regards,
Jan Hermann

User avatar
Member
Member
eagleag - 6/19/2012 5:55:17 AM
     
RE:nested repeater - contentBefore, container
Hi,
That wont help since I want the BEFORE and AFTER content to depend on the visibility of nested repeater etv.


thasnk

User avatar
Member
Member
charbf - 6/19/2012 11:43:10 PM
     
RE:nested repeater - contentBefore, container
This is what your looking for (the red part)



<cms:CMSRepeater
ID="rptSubitem"
runat="server"
ClassNames="CMS.MenuItem"
TransformationName="CMS.MenuItem.TOC"
Path="./%"
MaxRelativeLevel="1"
OrderBy="NodeOrder"
DelayedLoading="true"
SelectOnlyPublished="true"
HideControlForZeroRows="true" >
<HeaderTemplate><ul></HeaderTemplate>
<FooterTemplate></ul></FooterTemplate>

</cms:CMSRepeater>

1

Sitemap | Content Management System | E-commerce Software | Social Networking Software | Intranet | Online Marketing Solution | Copyright © 2004-2013 Kentico Software | Powered by Kentico CMS