1 contextual_links_example.module template_preprocess_contextual_links_example_object(&$variables)

Process variables for contextual-links-example-object.tpl.php.

See also

contextual_links_overview_page()

Related topics

File

modules/examples/contextual_links_example/contextual_links_example.module, line 297
Shows how to use Backdrop's contextual links functionality.

Code

function template_preprocess_contextual_links_example_object(&$variables) {
  // Here we take the object that is being themed and define some useful
  // variables that we will print in the template file.
  $variables['title'] = filter_xss($variables['element']['#object']->title);
  $variables['content'] = filter_xss($variables['element']['#object']->content);
}