Jump to content

FURL in plugin - it is possible?

Featured Replies

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?

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;
	}

 

  • Author

Adriano, thanks!

But it 's a "software way" and nothing like furl.json is here?

1 minute ago, desti said:

But it 's a "software way" and nothing like furl.json is here?

furl.json are for apps only.

  • Author

Thanks! 

Archived

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

Recently Browsing 0

  • No registered users viewing this page.