I have a taxonomy vocabulary with the below heirarchy:
*Property Type -Commercial -Office -Building -Warehouse -Residential -Villa -Apartment -Penthouse
I have two content types for the property information that has a common field called: 'Property Type' relating to that vocab above, again, for the two content types: "Commercial Property" & "Residential Property" they are using the same field declaration that relates to the same vocab group.
I want to use the php advance code to filter 'commercial' and 'residential' whichever content type is concerned. E.g. Villa, Apartment and Penthouse should only show under the "Residential Property" content type.
My Current code is this but it does not work:
if (arg(0) == 'node' && is_numeric(arg(1))) $nodeid = arg(1); if($nodeid) $type = noad_load($nodeid); if($type->type=='commercial_for_rent' || $type->type=='commercial_for_sale') return 798; else if($type->type=='residential_for_rent' || $type->type=='residential_for_sale') return 799;
In other words: Show only the sub category items of 'Property Type' vocab (e.g. "Residential terms") if content type being edited is this (e.g. "Residential Property" content type)...
Can someone help me point to the right direction please.