1

I've created a custom configuration text field in Magento admin called Link. Whatever is entered becomes pulled in frontend as URL. User can add absolute paths and also Magento variable {{store url='awesome.html'}}.

The question is how to pull the {{store url='awesome.html'}} in the frontend to become http://www.domain.com/awesome.html?

enter image description here

Mex Lane
  • 81
  • 5
  • Refer this http://stackoverflow.com/questions/5892476/how-to-get-data-from-magento-system-configuration – Venkat.R Jan 02 '16 at 06:54
  • Thank you, but this doesn't solve my question. My fields are text only fields, and I don't have any Model file. EDIT: I appropriated the solution from the link and it's working now. – Mex Lane Jan 02 '16 at 07:10
  • you have to evalute the value - http://stackoverflow.com/questions/6221054/magento-how-do-i-access-custom-variables-in-php – Venkat.R Jan 02 '16 at 07:15
  • is that working now ! – Venkat.R Jan 02 '16 at 08:02

1 Answers1

0

I used this in the block

echo str_replace( '{{store url=""}}', Mage::getBaseUrl(), $top_menu_category->getContent() ); ?>

And it works for me in blocks, you need to use that function, because as I see, in template that variables aren't parsed

jacr1614
  • 1,250
  • 2
  • 14
  • 23