Jump to content

FURL in plugin - it is possible?


desti

Recommended Posts

Posted
Quote

When developing an application, your FURL configuration is created in a file named furl.json in the /data directory of your app.

But if I am developing a plugin, can I add furl somehow?

Posted

Yes, with a hook on \IPS\Http\Url\Friendly::furlDefinition():

Example:

	public static function furlDefinition( $revert=FALSE )
	{
		$furls = parent::furlDefinition($revert);

		if( !isset( $furls['settings_recenttopics'] ) )
		{
			$furls['settings_recenttopics'] = array(
				'friendly'  => 'settings/recenttopics',
				'real'      => 'app=core&module=system&controller=settings&area=recenttopics',
				'regex'    	=> array('settings\/recenttopics'),
				'params'   	=> array(),
			);
		}

		return $furls;
	}

 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...