<%
}
%>';
$layouts_orig = $layouts;
$pos = strpos($layouts_orig, "}\n\t%>");
$layouts = substr($layouts_orig, 0, ($pos - 5)) . $new_layouts;
$new_spec_layouts = '
' . "\n";
$pos = strpos($layouts, '<% } else if (');
$append = substr($layouts, $pos);
$layouts = substr($layouts, 0, $pos) . $new_spec_layouts . $append; //i know there is a better way to do this!
$new_spec_content_layouts = '<% if ( view.model.attributes.specialty_columns > 3 ) { %>
<% } else { %>
<% } %>
<% if ( view.model.attributes.specialty_columns >= 4 ) { %>
<% } %>
<% if ( view.model.attributes.specialty_columns >= 5 ) { %>
<% } %>
' . "\n";
$pos = strpos($layouts, '<% } else { %>');
$append = substr($layouts, $pos);
$layouts = substr($layouts, 0, $pos) . $new_spec_content_layouts . $append; //i know there is a better way to do this!
return $layouts;
}
?>