Mark-H/EvoGallery — Issue #32: The Manage Photos link only appears if there are more than 2 TVs set up for the document.
Author: pavelzhila
Created: 2011-10-26 20:21:50+00:00
State: open

EvoGallery replaces regular TV input by the link "Manage Photos" and then MODx cleans up document edit page with following code:

// if template variables containers are empty, remove their section
if ($j("div.tmplvars :input").length == 0) {
$j("div.tmplvars").hide(); // Still contains an empty table and some dividers
$j("div.tmplvars").prev("div").hide(); // Still contains an empty table and some dividers
//$j("#sectionTVsHeader").hide();
}

So the quick fix for it is to insert fake hidden input with "Manage Photos" link.

Add this line

$output .= '$j(\'\').insertAfter(gl'.$mm_fields[$field]['fieldname'].');'."\n";

before this one

$output .= 'gl'.$mm_fields[$field]['fieldname'].'.remove();'."\n";

in gallerylink.inc.php