Search

I'd like to provide a help page for an extensions as a direct link in the extensions table (/symphony/system/extensions/). I remember this was possible in 1.7 - does anybody how to do this in 2.0?

It's not official, and will probably be changed sooner or later, so more like a hack than anything else... but if You open symphony/content/content.systemextensions.php, and scroll to line 40, You can see something like this there:

$td1 = Widget::TableData((!empty($about['table-link']) && $about['status'] == EXTENSION_ENABLED ? Widget::Anchor($about['name'], $this->_Parent->getCurrentPageURL() . 'extension/' . trim($about['table-link'], '/') . '/') : $about['name']));

If You check follow ExtensionManager->listAll() function code, You'll see that ExtensionManager->about() is called for every extension. There is no code which creates $about['table-link'], so You can try to set it in Your extension.driver.php file (in about() function), e.g.,

    public function about(){

        return array('name' => 'Example Extension',

                     'version' => '1.0',

                     'release-date' => '2009-01-11',

                     'author' => array('name' => 'Name',

                                       'website' => 'http://www.example.com',

                                       'email' => 'me@example.com'),

                     'description' => 'Just an example.',
                     'table-link' => '../../../extension/example',
        );

    }

You have to use "../../../" part to escape path hardcoded in content.systemextensions.php file. Then just add content.example.php to Your extension and click link to check if it works :).

Cool! Thank you!

It works just fine. But you have to disable and then reenable your extention (if it was installed before).

Hmm, i didn't have to reenable extension when i tested it, but i added link to page i already had "installed", so maybe it has to be reenabled when new page is added? Or maybe it was depending on some new delegate?

Marcin, do you know if there is a way to generate the markup of a content page without the need of using XMLElement() for each new element of the page. A simple way to insert HTML directly between the header and the footer of the admin pages? Something like:

$this->appendHTML('<p>I'm a paragraph.</p>');

or even better

$this->appendMarkdown('# I'm a headline');

(I'm sure the last one does not exist, but maybe the first one ...)

You can try to use XMLElement for root and then put rest of HTML as content, for example:

$xml->appendChild(new XMLElement('div', '<p>This <b>content</b> is just an <em>example</em>.</p>'));

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details