You'll most likely want to add linking to your plugin. Below, you'll find information about functions and naming conventions that will help you in this process.

The Basics

The following piece of code will produce a simple link pointing to /index.php/Special_Your_Script where A Label will be readable by the user.

echo common::Link('Special_Your_Script','A Label');
Will result in
<a href="<gpeasy_installation>/index.php/Special_Your_Script">A Label</a>
<a href="<gpeasy_installation>/index.php?r=Special_Your_Script">A Label</a>

If you have defined [Special:Special_Your_Script] in your plugin's Addon.ini file, then the php script you have associated with Special_Your_Script will be loaded.

Passing Arguments

echo common::Link('Special_Your_Script','A Label','cmd=do_something');
Will result in
<a href="<gpeasy_installation>/index.php/Special_Your_Script?cmd=do_something">A Label</a>
<a href="<gpeasy_installation>/index.php?r=Special_Your_Script&cmd=do_something">A Label</a>

As you can see, the string cmd=do_something, is added to the link as part of the query string.

Link Attributes

Passing HTML attributes to your links will be important for setting styles, ids, titles, etc.

echo common::Link('Special_Your_Script','A Label','','title="The Title"');
Will result in
<a href="<gpeasy_installation>/index.php/Special_Your_Script" title="The Title">A Label</a>
<a href="<gpeasy_installation>/index.php?r=Special_Your_Script" title="The Title">A Label</a>


Typesetter 5.1

Typesetter 5.0.1 is now available for download. 5.1 includes bug fixes, UI/UX improvements, ... Read More

Over 8 Times Faster Than Wordpress

We've known for a long time that Typesetter is fast. It's something we take pride ... Read More

More News

creisi productions

Dienstleistungen von creisi productions, Luzern (Schweiz): * Konzeption, Planung und Erstellung Ihres Internet-Auftritts * Betreuung und Aktualisierung/Pflege Ihrer Website * ...

Find out more about our Provider Spotlight

Log In