fabrik templating system

Delerium

New Member
I'm currently trying to write a flexbox based custom template for forms using the bootstrap template as a base, but I'm finding it nearly impossible to do because of how fabrik is written. After exploring the bootstrap template, I came to the realization that many design aspects that are typically restricted to being in a template are instead generated elsewhere in the plugin, in places that I don't have access to modify from the custom template.

An example is elements and their labels, which is written similar to this: "<?php echo $element->label;?>". This label's tag structure and construction is not created anywhere within the template system, but is instead generated in the back end with hard coded bootstrap css classes.

My question is, why is so much of the template being generated outside of the actual template (with hard coded bootstrap classes), and how do I work around it when creating my own form templates that don't use bootstrap?
 
If you want to keep form functions you must keep contructions Fabrik is relying on.
But beside of the templates there are several layouts which can be overridden.
http://fabrikar.com/forums/index.php?wiki/index/#designers
http://fabrikar.com/forums/index.php?wiki/jlayouts/

Additionally you can use e.g. $element->label_raw
The layout overrides is exactly what I was looking for. Thanks!

Edit: I looked into this and at first I was thinking the overrides could be contained in the fabrik template, but upon looking at it, it's instead overriding in the master joomla template. If I use the master template override, it would be applied to every form in the entire site instead of just on that one template, which is not what I want. Is there any way of overriding a layout from within the templates stored in com_fabrik/layouts/views/form/tmpl/{template name}? You see, I'm looking to keep all of the fabrik design changes contained in one place. Thanks in advance.
 
Last edited:
I eventually gave up on this and decided to load bootstrap from my fabrik templates instead of my main site template, thus giving me the ability to define the load order of the css layouts. That way I could make changes to bootstrap's style from within my template and have it take effect by loading my template's stylesheet last. Not ideal, but it works.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top