Skip to content

Instantly share code, notes, and snippets.

@ghalusa
Last active June 28, 2018 16:04
Show Gist options
  • Save ghalusa/4c07a6b879981c92ccbb26122ed62345 to your computer and use it in GitHub Desktop.
Save ghalusa/4c07a6b879981c92ccbb26122ed62345 to your computer and use it in GitHub Desktop.
AAA OGMT Theme Changes

ogmt.inc

(sites/all/modules/ogmt/ogmt.inc)

Line 500

Was:

$classes_array = ['page-' . $n, 'pagecount-' . $page_count];

Changed to:

$classes_array = array('page-' . $n, 'pagecount-' . $page_count);

ogmt-object-group-page.preprocess.inc

(sites/all/themes/si_aaa/preprocess/ogmt-object-group-page.preprocess.inc)

Line 12

Was:

$og_object = $vars['object_group'];

Changed to (casting to an array):

$og_object = (array)$vars['object_group'];

Line 76

menu is not in $object_page anymore.

$object_page looks like this now:

array(1) {
  ["feature"]=>
  array(1) {
    ["url"]=>
    string(127) "http://ids.si.edu/ids/deliveryService?max=200&id=https://www.aaa.si.edu/assets/images/charmary/reference/AAA_charmary_63788.jpg"
  }
}

Was:

if (!is_array($object_page['menu']) || empty($object_page['menu'])) {

Changed to:

if (!is_array($object_group['menu']) || empty($object_group['menu'])) {

Note: After line 76, changed all instances of $object_page to $object_group.

Line 91

Was: ($object_group['url']):

$bp = _get_path_for_objectgroup(TRUE, $og_type, $object_group) .'/'. $object_group['url'];

Changed to ($object_group['uri']):

$bp = _get_path_for_objectgroup(TRUE, $og_type, $object_group) .'/'. $object_group['uri'];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment