I am having a problem comparing a variable in a dataobject with a variable (one step up) in a productlisting page.
The variable in the product is called ProductCategory, and variable in the productlisting (or product holder) is called Category
I am actually using DataObjectAsPage module, but it is built on the dataobjectmanager.
function checkSomething(){
if ($this->ProductCategory != $Top.Category) {
return false;
} else {
return true;
}
}
then in the listing page I have <% if checkSomething %> which is inside the <% control %> loop for the products (on the product holder page)
Inside the control loop, in the .ss file I can print both these variables using $ProductCategory, $Top.Category
But not sure if Top is not working in the php file?
cant do an if statement right in the ss page, ss doesnt allow it?
Any help would be appreciated.
Thanks,