What is so odd about the "form" template?

daneyul

New Member
I can easily override the Form, List and Detail template groups by cloning the originals in the same directory path--for example: "..components/com_fabrik/view/forms/tmpl/bootstrap"
gets copied to: "..components/com_fabrik/view/forms/tmpl/my_form_override"
and everything is fine once I tell Fabrik to use the new template. So far so good.

But--Joomla has a "Template Manager" that allows for the creating of overrides. For example, when I want to override my list template, it copies fabrik's list template folder to ../templates/"my template"/html/com_fabrik/list, and without making any other changes to Fabrik the copy gets picked up as the override--it sees the new one instead of the old one. (Overriding this way can be useful as it allows for the use of the Template Manager's editor to edit the template files live on site without ftp'ing. It's a crappy editor, but it is convenient.)

This works fine for the List template, and the Details template. But never works with the Forms template. The form template folder indeed gets copied into the "...template/my template/html/com_fabrik" directory structure, but is never actually used as the override.

There's something odd about the Form template in this regard it seems. You CAN override it by duplicating it within the ..component/com_fabrik directory structure and choosing your duplicated template in Fabrik, but it can't be used as an override when put in the subdirectory of the site template, at least when using the Template Manager functionality.

At least that's how it's working for me.
 
Can you make sure it is creating the override in ./templates/yourtemplate/html/com_fabrik/form/bootstrap (or whatever form tmeplate you are overriding).

I just checked our code, and that should definitely be added to the template paths, as you can see in ./components/com_fabrik/view/form/view.base.php, line 283 ....

Code:
        $this->addTemplatePath($root . '/templates/' . $this->app->getTemplate() . '/html/com_fabrik/' . $folder . '/' . $tmpl);

... and I ran a test using the same method you are, by going through the J! template manager ...

http://screencast.com/t/B5p279zHOBVd

You can see where my debugger kicks in, and I step through the code where we add the template override path in that line of code above in view.base.php, and where J! picks it up and uses it in loadTemplate(), and my "FOOOOOOOVERIDE" is output on the form.

Is this on the front end or the back end, or both?

-- hugh
 
Back
Top