solved Module Category and URL

SoftDesigns
SoftDesigns
@softdesigns
7 years ago
242 posts
Hi : Creating a module, that we want the URL to be directly after the ROOT of Site, not on profile...

	$_tmp = array(
			'name'        => 'TEST',
			'url'         => 'test',
			'version'     => '1.0.0',
			'developer'   => 'SoftDesigns',
			'description' => 'TEST Module',
			'category'    => '???',
			'priority'	  =>  25
	);
	return $_tmp;
--
'category' => '???'
--
What do we put for value of Category in META ?
updated by @softdesigns: 01/14/18 03:58:45PM
SteveX
SteveX
@ultrajam
7 years ago
2,584 posts
Category is where it appears in the ACP admin menu.

You can make a template for the module named index.tpl and your url will be yoursite.com/test.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
SoftDesigns
SoftDesigns
@softdesigns
7 years ago
242 posts
Hi - Thanks
--
We had the module working when show on Profile.
--
Now we try move it to ROOT : yoursite.com/test
But it fails :(
--
Does "index.tpl" - go in ROOT module folder, or under "templates"?
--
Still it fails, when we move to ROOT
Does it also need index.php ?
updated by @softdesigns: 10/13/17 09:40:36AM
SoftDesigns
SoftDesigns
@softdesigns
7 years ago
242 posts
We added the index.php - almost working...
--
If you type URL = yoursite.com/test
--
We want it to call this function:
function view_test()
{
}
--
What php function do we need to define - so that our function is called at:
yoursite.com/test ?
updated by @softdesigns: 10/13/17 09:53:54AM
SteveX
SteveX
@ultrajam
7 years ago
2,584 posts
Try creating a view like this:
//------------------------------
// default
//------------------------------
function view_yourModule_default($_post, $_user, $_conf)
{ return "here is the view"; }



--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
SoftDesigns
SoftDesigns
@softdesigns
7 years ago
242 posts
Thanks - Yes, you are right. Now all is working...
--
view_yourModule_default
--
This function gets called by default at : yoursite.com/yourModule
--
Great Support. - Solved...

Tags