How to specify WhereCondition in Transformation - Nested Control - kentico 8, 7, 6
Before this i wonder how to pass some where condition in transformation repeater. So i ask the kentico guys and he give me a solution which i think i can share to the others.
So in your transformation you can specify the <script runat="server"></script> element. This is where you can pass the where condition.
Let see the example :
By Mohd Zulkamal
NOTE : – If You have Found this post Helpful, I will appreciate if you can Share it on Facebook, Twitter and Other Social Media Sites. Thanks =)
So in your transformation you can specify the <script runat="server"></script> element. This is where you can pass the where condition.
Let see the example :
Transformation Code
<cms:queryrepeater id="repItems" ... DelayedLoading="true" ... />Note : queryrepeater dont have DelayedLoading properties, use DataBindByDefault="false" instead.
<script runat="server">
protected void Page_PreRender(object sender, EventArgs e)
{
queryrepeater.WhereCondition= "NodeAliasPath LIKE '"+(string)Eval("NodeAliasPath")+"'";
queryrepeater.ReloadData(true);
}
</script>
By Mohd Zulkamal
NOTE : – If You have Found this post Helpful, I will appreciate if you can Share it on Facebook, Twitter and Other Social Media Sites. Thanks =)