With Varien_Data_Form_Element_Renderer_Interface
you have the freedom do design the whole row as you want. Since you extend Mage_Adminhtml_Block_Abstract
and return only the iframe in its render()
method, this is what you get. To use the default table layout, extend Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset_Element
instead, and use its default toHtml()
method after modifying the element property to display the iframe.
Currently the render
method will receive a Varien_Data_Form_Element_Link
as parameter because that's the frontend_type
, that you specified. But since you don't want to actually show an input field, you should change that to a frontend type where you can more easily replace the rendered output to arbitrary HTML.
I suggest using label
, then the render method looks like this:
public function render(Varien_Data_Form_Element_Abstract $element) {
$url = Mage::helper('mymodule')->getMapUrl($store = null);
$element->setData('value', '');
$element->setData('after_element_html', '<iframe style="border: 0;" src="'.$url.'" frameborder="0" width="100%" height="270"></iframe>');
return $this->toHtml();
}
Note that you have to use after_element_html
and leave value
empty, because the value of a label is always escaped, while you can always use arbitrary HTML in after_element_html
In order to change your admin url the only thing you needed to do was going to your local.xml
and putting the correct name in this node, inside <![CDATA[]]>
:
<admin>
<routers>
<adminhtml>
<args>
<frontName><![CDATA[admin]]></frontName>
</args>
</adminhtml>
</routers>
</admin>
So, you should just undo all changes you did and put desired frontName
for backend in local.xml
.
Best Answer
you can do with open the table
core_config_data
,correct the values for the paths
web/unsecure/base_url
and web/secure/base_url. Make suredev/js/merge_files
anddev/css/merge_css_files
are both 0.Clear the cache by deleting all files in
var/cache/
in your Magento directoryAlso make sure and clean your browser
cache
andcookies
hope this will work for you.