Attribute Filter in Category tree

Hi all,
I want to have the attribute filter capability above the category tree on the left hand side.
To achive this I commented out the attribute filtering on list.tpl and copied the respective code in a new tpl filterbox.tpl
I include the filterbox.tpl in category_tree.tpl

[{assign var=“oContentCat” value=$oView->getContentCategory() }]
[{* =======================Show Filter for categories on the left hand side ============== }]
[{include file=“inc/filterbox.tpl”}]
[{
===================End Show Filter for categories on the left hand side ============== *}]

it works fine but when I select a product in category view to see more details I get

Fatal error: Call to undefined method stdClass::getTitle() in C:\xampp\htdocs\shop mp\45268ba29d67e13d3dfd7c5bcc8527c5^%%18^18C^18CB9DBE%%filterbox.tpl.php on line 44

The respective line is
"><?php echo $this->_tpl_vars[‘oFilterAttr’]->getTitle(); ?>
which doesn’t mean anythign to me.
I guess _tpl_vars[‘oFilterAttr’] is either null or not defined but how to check this or even better where to set it
Any suggestion is highly welcome

btw. I am new to oxid.

Thanks for help

P.S.
filterblock.tpl
[{* =======================Show Filter for categories on the left hand side ============== *}]

[{if $actCategory->oxcategories__oxthumb->value }]
[{assign var=“thumbUrl” value=$actCategory->getThumbUrl()}]
[{if $thumbUrl }]
<img src="[{ $thumbUrl }]" alt="[{ $actCategory->oxcategories__oxtitle->value }]"><br>
[{/if}]
[{/if}]

[{assign var=“oCategoryAttributes” value=$oView->getAttributes()}]
[{if $oCategoryAttributes }]
<strong class=“h2 search”>Filter</strong>

&lt;form method="post" action="[{ $oViewConf-&gt;getSelfActionLink() }]" name="_filterlist" id="filterList"&gt;
&lt;div class="catfilter"&gt;
  [{ $oViewConf-&gt;getHiddenSid() }]
  [{ $oViewConf-&gt;getNavFormParams() }]
  &lt;input type="hidden" name="cl" value="[{ $oViewConf-&gt;getActiveClassName() }]"&gt;
  &lt;input type="hidden" name="tpl" value="[{$oViewConf-&gt;getActTplName()}]"&gt;
  &lt;input type="hidden" name="fnc" value="executefilter"&gt;

  &lt;table cellpadding="3" cellspacing="0"&gt;
  	[{foreach from=$oCategoryAttributes item=oFilterAttr key=sAttrID name=testAttr}]
      &lt;tr&gt;
      	&lt;td style="padding-left:10px"&gt;
        	&lt;b&gt;
          	&lt;label id="test_attrfilterTitle_[{$sAttrID}]_[{$smarty.foreach.testAttr.iteration}]"&gt;[{ $oFilterAttr-&gt;getTitle() }]:&lt;/label&gt;
          &lt;/b&gt;
          &lt;br&gt;

          &lt;select name="attrfilter[[{ $sAttrID }]]" width="160" STYLE="width: 160px" size="0" onchange="oxid.form.send('filterList');"&gt;
          &lt;option value="" selected&gt;[{ oxmultilang ident="LIST_PLEASECHOOSE" }]&lt;/option&gt;
          [{foreach from=$oFilterAttr-&gt;getValues() item=sValue}]
          	&lt;option value="[{ $sValue }]" [{ if $oFilterAttr-&gt;getActiveValue() == $sValue }]selected[{/if}]&gt;[{ $sValue }]&lt;/option&gt;
          [{/foreach}]
        	&lt;/select&gt;
        &lt;/td&gt;
    	&lt;/tr&gt;
    [{/foreach}]
  &lt;/table&gt;

  &lt;noscript&gt;
  	&lt;input type="submit" value="[{ oxmultilang ident="LIST_APPLYFILTER" }]"&gt;
	&lt;/noscript&gt;
&lt;/div&gt;
&lt;/form&gt;

[{/if}]
[{* ===================End Show Filter for categories on the left hand side ============== *}]

Hi,

probably, the requested data are not available in the method you are calling. IMO, it is not simply done with copying the code from one template to another, Eventually, you have to write at least a getter module.

Regards

Please use formatting options for code, it’s so hard to read without formatting.
Attribute filters only work in list view, so you should check whether you are in list view:


[{* =======================Show Filter for categories on the left hand side ============== *}]
[{if $oView->getClassName()=="alist"}]
    [{include file="inc/filterbox.tpl"}]
[{/if}]
[{* ===================End Show Filter for categories on the left hand side ============== *}]