[SOLVED] bootstrap and jquery framework <script> not loading when using tmpl=component

Status
Not open for further replies.

Basdub

Member
I have a details view that load properly using conventional access to it. I want to use this template for printing.

I have followed the steps in http://fabrikar.com/forums/index.ph...-printer-friendly-template.37572/#post-189192

But whenever I use tmpl=component, the bootstrap and jquery framework don't load -> the script tag for them are missing in the head section.

My template code JHtml::_('behavior.framework'); is executed,
FabrikHelperHTML::framework(); is executed,

Then I even add the code in the post linked above

I get all the js for Fabrik, my details_1.js loaded but never JQuery and Bootstrap.

In templates/mytemplate/component.php I have <jdoc:include type="head" /> in the header section. And this template does get parsed.

Anything I could be missing? I'm out of ideas. Been on that all afternoon yesterday.
 
SOLVED, I guess I had to create a post to find it. At least I'll post my findings.

After digging even farther into the code and online research, I figured that the bootstrap.framework was loaded by the template. So I tried adding the header part of my template into the component template. In my case since using helix 2 framework from joomshaper, it looked like this
PHP:
$this->helix->Header()
            ->setLessVariables(array(
                    'preset'=>$this->helix->Preset(),
                    'header_color'=> $this->helix->PresetParam('_header'),
                    'bg_color'=> $this->helix->PresetParam('_bg'),
                    'text_color'=> $this->helix->PresetParam('_text'),
                    'link_color'=> $this->helix->PresetParam('_link'),
                    'footer_color'=> $this->helix->PresetParam('_footer'),
                    'feature_color'=> $this->helix->PresetParam('_feature')
                ))
            ->addLess($this->helix->Preset());

I added this under the

Code:
<jdoc:include type="head" />

of my component template located in templates/my_template/component.php

Now back to development as oppose to troubleshooting.
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top