additional tab "talk" on the normal "pages"?

Greetings,

I search a plugin, that can add an additional tab (e.g. talk /discussion) by a normal page site.

Just as it is at wikipedia (www.wikipedia.org) (one tab "articel" tab and one "talk")

It this possible?

Regards

Michael

  • Do you need to add the links at top menu ?

  • The current display of the header from a page is:

    <page title> <access level> "History" "Edit" "X" (Delete this)

    The new:

    <page title> <access level> "History" "Edit" "Edit talk" "X" (Delete this)

    The "talk page" can be a normal page that pointed to the original page.

    Also the "talk pages" are not displayed in the page hierarchie.

  • @Michael Use Entity menu for it.

    E.g. for pages:

    function pages_entity_menu_setup($hook, $type, $return, $params) {
        if (elgg_in_context('widgets')) {
            return $return;
        }

        $entity = $params['entity'];
        $handler = elgg_extract('handler', $params, false);
        if ($handler != 'pages') {
            return $return;
        }

        // remove delete if not owner or admin
        if (!elgg_is_admin_logged_in() && elgg_get_logged_in_user_guid() != $entity->getOwnerGuid()) {
            foreach ($return as $index => $item) {
                if ($item->getName() == 'delete') {
                    unset($return[$index]);
                }
            }
        }

        $options = array(
            'name' => 'history',
            'text' => elgg_echo('pages:history'),
            'href' => "pages/history/$entity->guid",
            'priority' => 150,
        );
        $return[] = ElggMenuItem::factory($options);
        
        $options = array(
            'name' => 'talk',
            'text' => elgg_echo('pages:talk'),
            'href' => "url_to_your_page",
            'priority' => 250,
        );
        $return[] = ElggMenuItem::factory($options);

        return $return;
    }

     

    If you want New tab for Menu navigation (like as wikipedia'a article) then combine  Elgg menu and/or Tabs

    See also Custom Tabs plugin

  • Hello,

    where do I add the code?
    Regards  Michael