Magento 1.9 – Config Path Variables Available in Static Blocks

magento-1.9static-block

I've tried to find an answer for this, but can't manage to.

I'm trying to access {{config path="design/header/logo_src"}} in a static block in Magento 1.9CE, but all design/header/* values seem to be inaccessible. Is there any way to use them in a static block?

Thanks for all your help.

Best Answer

Welcome to Magento.SE!

I am not having the same issue as you are. It seems to be working for me - so I'm wondering how you're referencing your static block; perhaps you're missing something?

Here's my static block:

enter image description here

And a demo test.php file to output it:

<?php

require('app/Mage.php');
Mage::app();

$block = Mage::app()->getLayout()->createBlock('cms/block')->setBlockId('test');
echo $block->toHtml();

And the output I get:

> php test.php
images/logo.gif

Some things to check:

Make sure you're calling toHtml on the static block. If so, make sure that the static block is set to use the correct store view (in multistore mode). Make sure that you're using the right block id.

Related Topic