Im building a Social module aand one of the features is that the users can add their own Meta Cards like twitter:cards and opengraph data.
At the moment the user inputs their meta data into a simple text box like the cms page content box and the data outputs fine except dynamic values.
My question is how can i echo dynamic data in these meta tags in the head? e.g the current products name and description.
Obviously i don't want to save php in the db and it will just print the php anyway.I have also tried to define a block and template and a cms variable in the cms content but this again just outputs the block/variable declaration in the head instead of the value it should return.
Any ideas would be great.
Thanks
EDIT Here is what currently outputs in the head:
<meta property="og:site_name" content="<?php echo Mage::app()->getStore()->getName();?>" />
<meta property="og:title" content="<?php echo $this->getTitle(); ?>" />
<meta property="og:description" content="<?php echo $this->getDescription(); ?>" />
<meta property="og:url" content="<?php echo Mage::helper('core/url')->getCurrentUrl(); ?>" />
Where the example PHP is i need to replace with data.
EDIT
This is not a duplicated question. The users define the content in my use case therefore a static template will not work as defined in the links duplicated post.