Hi..
Thanks.. yep, I have been using result ids in the past and have no issues with them. This is the first time that I have triggered an ajax call from an <a> tag. The controller is triggered from the ajax links in 'header_search_filters.tpl'.. so effectively I need it to update itself. here is my controller code:
list($products, $params) = fn_get_products(array());
Registry::get('ajax')->assign('productCount', count($products));
Registry::get('ajax')->assignHtml('headerSearchFilters', Registry::get('view')->fetch('addons/my_changes/blocks/product_filters/header_search_filters.tpl'));
here is my template file:
<div class="shop-by-item">
<ul>
{foreach from=$items item="filter" name="filters"}
{if $filter.filter_id == 26}
{math equation="floor(100/x)" x=$filter.ranges|@count assign="cell_width"}
{foreach from=$filter.ranges item="range"}
{assign var="info" value="_"|explode:$range.range_name }
{assign var="start" value=$info[0]}
{assign var="end" value=$info[1]}
{if "R`$range.range_id`"|fn_my_changes_filter_range_selected}
{assign var="range_class" value="shop-by-range-selected"}
{else}
{assign var="range_class" value="shop-by-range-deselected"}
{/if}
<li>
<a class="cm-ajax-full-render cm-ajax {$range_class}" rel="nofollow" rev="headerSearchFilters" href="index.php?dispatch=filters.select_single_filter&filter={$filter.filter_id}&range=R{$range.range_id}&filter_return_url={$config.current_url|fn_url|urlencode}">{$start}mm {if $end}-{/if} {$end|default:"+"}{if $end}mm{/if}</a>
</li>
{/foreach}
{/if}
{/foreach}
</ul>
</div>
my template adds to the blocks schema with the following:
$schema['product_filters']['templates']['addons/my_changes/blocks/product_filters/header_search_buttons.tpl'] = array ('fillings' => array ('filters','all'));
The first time my template loads, it displays the filters. What I want to happen is that when a user selects one of the filters is that the ajax request is made to my controller which results in the filter being marked as selected on the server and the template renders again with a visual change by changing the CSS class on the <a> tag for the respective filter..
So it all works, expect when the controller renders the template the second time around, I get no filters assigned to it. So the result id's are working, but its more the block content that is not working..
I hope that makes sense