I installed mg backend widget on another modx install I have and when viewing the galley tab I see another document in the preview instead of the gallery managment. (shows doc id 2)
I read back the posts and changed
return (int)$id; in the snippet but it didn’t help.
the frame source seems to me like it gets the correct IDs.
doc ID 29 is my mg_backend document with the GetGalleryID snippet and 27 is the document with the gallery.
Do you see anything that’s wrong or can think on something I can try?
Thanks in advance.
$('div#'+mm_lastTab).after('<div class="tab-page" id="tabmgmanager"><h2 class="tab">Edit gallery</h2><div class="tabIntro" id="tab-intro-mgmanager">If the tab is empty, please, click here to <a onclick="saveRefreshPreview();" href="#"> Save and Refresh</a><iframe id="mgmanager" src="http://domain.com/?id=29&mmgal_id=27" height="500" width="100%" scrolling="no" frameborder="0"></iframe></div><table width="450" border="0" cellspacing="0" cellpadding="0" id="table-mgmanager"></table></div>');
mm_lastTab = 'tabmgmanager';
tpSettings.addTabPage( document.getElementById( "tabmgmanager" ) );
// -------------- mg_backend_manager widget include -------------
var iFrames = document.getElementsByTagName('iframe');
function iResize()
{
iFrames[0].style.height = iFrames[0].contentWindow.document.body.scrollHeight + 'px';
}
$('iframe').load(function()
{
setTimeout(iResize, 0);
}
);