friends, I create custom pages for mobile Products list. I added a filter in the form of drop down on the top toolbar, there is Filter by Category, Filter by Attribute and Sort By (Position, Name, Price, and Brand). I've successful create a drop down Filter by Category and Sort by, and functioning properly. I'm adding Filter by Category and Sort by in app\design\frontend\andi\phone\template\catalog\product\list\ctoolbar.phtml
Filter by Attribute, I have not managed to make his drop down.
Here's what I do to display the Filter by Attribute in toolbar :
Go into catalog.xml and in delete left thing
Put this after the line with product_list name:<block type="catalog/layer_view" name="filter_by_attributes" template="catalog/layer/view.phtml"/>
Then in list.phtml call :
<?php echo $this->getChildHtml('filter_by_attributes'); ?>
My View.phtml to call the Filter Attribute (app\design\frontend\andi\phone\template\catalog\layer\view.phtml) :
<?php if($this->canShowBlock()): ?>
<?php echo $this->__('Filter') ?>
<div class="block-layered-nav">
<dl id="narrow-by-list">
<?php $_filters = $this->getFilters() ?>
<?php foreach ($_filters as $_filter): ?>
<?php echo $_filter->setTitle($_filter->getName())->getHtml() ?>
<?php endforeach; ?>
</dl>
<script type="text/javascript">decorateDataList('narrow-by-list')</script>
<script type="text/javascript">
//<![CDATA[
var _used_filter = [];
<?php foreach ($_filters as $_filter): ?>
_used_filter.push('<?php echo $_filter->getRequestVar() ?>');
<?php endforeach; ?>
//]]>
</script>
<?php endif; ?>
then the main question is
how to make the dropdown Filter by Attribute based on catalog\layer\view.phtml?