Magento Coding Solutions

how to get filterable attributes and options in magento programmatically

Add this code in Product List.phtml otherwise you should be assign category Id 
<?php
echo "<pre>";
$_category = Mage::registry('current_category');
$category_id= $_category->getId();
$layer = Mage::getModel("catalog/layer");
$category = Mage::getModel("catalog/category")->load($category_id);
$layer->setCurrentCategory($category);
$attributes = $layer->getFilterableAttributes();
foreach($attributes as $attribute){
if($attribute->getAttributeCode() == 'price'){
$filterBlockName = 'catalog/layer_filter_price';
}elseif($attribute->getBackendType() == 'decimal'){
$filterBlockName = 'catalog/layer_filter_decimal';
}else{
$filterBlockName = 'catalog/layer_filter_attribute';
}

$result = Mage::app()->getLayout()->createBlock($filterBlockName)->setLayer($layer)->setAttributeModel($attribute)->init();


$count = count($result->getItems());
echo "</br>";
if($count > 0){
echo $attribute->getFrontendLabel();
echo $attribute->getAttributeCode();
}
if($count > 0){

foreach($result->getItems() as $option) {


echo '<a href="'.$this->urlEscape($option->getUrl()).'">'.$option->getLabel().'</a>';
echo " ";
//echo $option->getValue();

echo "(".$option->getCount().")";
}
}
}
echo "</pre>";
?>

Magento module admin from.php




Reservation: is module
1) you can make new form 

$form = new Varien_Data_Form();


$fieldsetDesignImage = $form->addFieldset("designimage_form");


2) If Any Nots  as well HTML can you write
Location: " app/code/local/Mpb/Reservation/Block/Adminhtml/Reservation/Edit/Tab"

$table="design";
$fieldset->addField('note', 'note', array(
'label' => Mage::helper('reservation')->__('test'),
'text' => Mage::helper('reservation')->__($table),
));
3) you can add textarea with editor

$fieldset->addField("comments", "textarea", array(
"label" => Mage::helper("managedesign")->__("Comments"),
"name" => "comments",
"wysiwyg" => true,
));
4) add Link type in grid.php

 $this->addColumn('Download', array(
            'header'    => "Download Artwork",
            'index'     => 'Download Artwork',
            'type'      => 'link',
            'align'     => 'center',
           'renderer'  => 'managedesign/adminhtml_managedesign_renderer_Doenloadlink'
));