Пример #1
0
/**
 * Implementation of hook_preprocess_node().
 */
function foundation_access_preprocess_node(&$variables)
{
    $type = 'node';
    $bundle = $variables['type'];
    $viewmode = $variables['view_mode'];
    // add the view mode name to the classes array.
    if (isset($viewmode)) {
        $variables['classes_array'][] = str_replace('_', '-', $viewmode);
    }
    // create inheritance templates and preprocess functions for this entity
    if (module_exists('display_inherit')) {
        display_inherit_inheritance_factory($type, $bundle, $viewmode, 'foundation_access', $variables);
    }
}
Пример #2
0
/**
 * Implementation of hook_preprocess_node().
 */
function foundation_access_preprocess_node(&$variables)
{
    $type = 'node';
    $bundle = $variables['type'];
    $viewmode = $variables['view_mode'];
    // add the view mode name to the classes array.
    if (isset($viewmode)) {
        $variables['classes_array'][] = str_replace('_', '-', $viewmode);
    }
    // hook on the iframe mode stuff
    if (module_exists('cis_connector') && module_exists('entity_iframe')) {
        $settings = _cis_connector_build_registry(elmsln_core_get_profile_key());
        $variables['iframe_path'] = _cis_connector_format_address($settings, '/', 'front') . 'entity_iframe/node/' . $variables['nid'];
    }
    // create inheritance templates and preprocess functions for this entity
    if (module_exists('display_inherit')) {
        display_inherit_inheritance_factory($type, $bundle, $viewmode, 'foundation_access', $variables);
    }
}