Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

Go to Admin->System->Permission->Variables and there add your config path first to access it in static block. Because after SUPEE 6788, there are restrictions to use all config paths.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top