Hi VeCrea
your directory _fork/.....
for me i had to create the fork directory without the underscore
\helpers\helper.php
public static function loadFork($file)
{
//Transform the file path to reach the fork directory
$file = preg_replace("#com_mycomponent#", 'com_mycomponent' .DS. 'fork', $file);
// Load the fork file.
if (!empty($file) && file_exists($file))
include_once($file);
}
further to this
i wonder from another post in the display function in view.html.php
$this->addForkTemplatePath()
it calls this function below in the file
administrator/components/com_mycomponent/classes/view/view.php
protected function addForkTemplatePath()
{
$this->addTemplatePath(JPATH_COMPONENT .DS. 'fork' .DS. 'views' .DS. $this->getName() .DS. 'tmpl');
}
question is why on the administrator side does it add TemplatePath containing JPATH_COMPONENT should this not be JPATH_COMPONENT_ADMINISTRATOR
from the Joomla documentation
JPATH_COMPONENT The path to the current component being executed.
JPATH_COMPONENT_ADMINISTRATOR The path to the administration folder of the current component being executed.
have a look inside the above function
$this->addTemplatePath(JPATH_COMPONENT .DS. 'fork' .DS. 'views' .DS. $this->getName() .DS. 'tmpl');
and where does this function reside?? i am guessing in CkJView but where is the CkJView class (guessing the plugin)
(again should it not call the component admin path?)
Just a quick look but there could be a valid reason why admin side is calling JPATH_COMPONENT rather than JPATH_COMPONENT_ADMINISTRATOR