This is my rule
where user profile fb_likes field contains sitecore
set data source to TestItem2
I have applied this rule to a sublayout on standard values of the template,but this rule never change the data source.
I have also tried this condition
where true (action always execute).
but again no luck,
if I change action to
hide rendering
it works fine.
what I’m doing wrong here??
Does the code of your sublayout make allowances for using the Datasource when it is set over the context item? You can achieve this in a number of ways. E.g in a base class:
Then inside your code for your sublayout use the DatSourceItem rather then the context item to display content. Another way I have seen this done is to:
Using this all your sublayouts that inherit this in their base class will natively support Data source even if the code is written against the Context item.