Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function boost_helper_theme() {
- return array(
- 'boost_helper_backlink' => array(
- 'arguments' => array('title' => NULL, 'path' => NULL),
- ),
- );
- }
- function boost_helper_nodeapi(&$node, $op, $a3 = null, $a4 = null) {
- if ($op == 'view' && $node->type == 'page') {
- $mat = menu_get_active_trail();
- $level = count($mat) - 1;
- $menu_item = $mat[$level];
- if ($level > 3)
- {
- $section_menu_item = $mat[3];
- }
- $body = $node->content['body']['#value'];
- print "*".theme('boost_helper_backlink', 'test', 'test')."*";
- // $body = theme('back_link', $section_menu_item['title'], $section_menu_item['path']) . $body;
- print_r($body);
- die();
- }
- }
- function theme_boost_helper_backlink($title, $path) {
- print $title;
- return '<p class="backlink-to-parent">Back to ' . l($title, $path) . '</p>';
- }
Add Comment
Please, Sign In to add comment