Oxblock - different block in different shops


today i tried to load different block in diffent shops. My first thought was to add a entry in the table.oxtplblocks" with the shopid of the shop i want to load the block.

What happend was that i got my block in all my subShops(Malls). So after a while i recognized that it happend because the smarty tpl cache are generated by shop “A”, and because of that all other shop get that cache file with my new block.

So i looked in the core files and found in oxutilsview->getTemplateBlocks() something i dont really understand. That function are called by the first view of a page about 25 times. On the second View 2 Times, because of the smarty tpl cache, and because of that its not possible to load different blocks in different shops by mapping it in the db table, or i am wrong?
So my first question: is that a bug or a feature?

I’ve got now 2 differend solutions.
1: changing the smarty cache_dir and compile_dir in oxutilsview->_fillCommonSmartyProperties() by adding the shopid."/".
So every Shop have to cache his self smarty files.

  1. Just adding [{if $shopid == x}] [{else}][{$smarty.block.parent}] directly in my new block.
    Wich one is better?

regards Bernd Hasis