Hier findet ihr eine kleine nützliche kostenfreie Magento-Toolbar!
Product Description
Advanced developer toolbar with profiling, db queries, block nesting, requests and caching.
Features:
- Requests: involved controller classes, modules, actions and request parameters
- General Info: website id, website name, store id, store name, storeview id, storeview code, storeview name and configured caching method
- Blocks: overview of block nesting
- Config: enable/disable frontend hints, inline translation and cache clearing
- PHP-Info: output of phpinfo()
- Profiling: output of Varien_Profiler with function execution time, function count and memory usage
- Additional Information: version information, page execution time and overall memory usage
- DB-Profiler: Number of executed queries, average query length, queries per second, longest query length, longest query and detailed query listing including simple syntax highlighting of SQL.
Ihr könnt in Magento ein statischen CMS Block wie folgt im template einbinden.
Ein Beispiel zum einbinden über die entsprechende layout.xml :
<layout>
<asdf_xy_zzz>
<reference name="content">
<block type="cms/block" name="cms_store_check">
<action method="setBlockId"><block_id>store_check</block_id></action>
</block>
</reference>
</asdf_xy_zzz>
</layout>
Direkt einbinden im Template:
echo $this->getLayout()->createBlock('cms/block')->setBlockId('your_id')->toHTML();?>
Einbinden im CMS:
{{block type="cms/block" block_id="your_id" template="cms/content.phtml"}}
Im Admin-Backend ist es möglich ein url-key für z.B. Kategorien zu setzen. Möchtet ihr jetzt automatisch von Magento anhand dieser ein Link erzeugen, könnt ihr das wie im folgenden Beispiel:
<a href="<?php echo Mage::getModel('catalog/category')->load(Mage::getModel('catalog/category')->getCollection()->addAttributeToFilter('url_key', 'all-bags')->getAllIds())->getUrl(); ?>" title="All bags" ><?php echo $this->__('All bags'); ?></a>