Questions tagged [jdocument]
The jdocument tag has no usage guidance.
16
questions
0
votes
1
answer
418
views
Joomla 4.1.5 <meta name="keyword"> doesn't show
I use Joomla 4.1.5, and I created my own Joomla Template following the tutorial from joomla.org. My problem is that while other metadata shows correctly on the frontend pages, the <meta name="...
0
votes
0
answers
128
views
addStyleDeclaration is not working in my 4.0 module
I'm trying to insert inline css in a module and it's not working.
In one of my modules php files i have the following:
$document = Factory::getDocument();
// Add styles
$style = 'body {'
. '...
1
vote
2
answers
257
views
Use addScriptOptions for multiple modules on same page
I am passing some params to JS in my custom module using the addScriptOptions provided by Joomla:
$document->addScriptOptions("mod_mymodule", $params));
This works fine, as long as there ...
3
votes
0
answers
191
views
Document Manager Recommendations
I'm looking for some recommendations for a document manager that's compatible with Joomla 3+. Seems to be a pretty popular question throughout the Joomla community.
In the past I've always used Phoca ...
0
votes
2
answers
23k
views
was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff)
The files are loaded as so:
$document = JFactory::getDocument();
$document->addScript('media/breezingforms/slider-radio/slider-radio/slider-radio.js');
$document->addStyleSheet('media/...
1
vote
2
answers
72
views
How to overwrite a module's .php to control what scripts it adds to the head of the doc?
I am new to Joomla. I have installed a plugin and I want to overwrite the module file to remove some of the unwanted scripts.
project
modules
mod_modulename
mod_modulename.php
How can I overwrite ...
6
votes
2
answers
2k
views
Control order of loaded scripts
Unfortunatelly I can't register on the joomla forum, so I'll try my best here.
Please help, is there any way to control the order of loaded scripts.
Example:
in my template's index.php I do:
$...
1
vote
1
answer
61
views
How to add <base target="..."> when using tmpl=component
I am planning to use tmpl=component within the URL for some pages on my site to enable them to be embedded in iframes conveniently and only show the document content.
However, I want any links ...
2
votes
2
answers
875
views
Problem with JFactory::getDocument() when module is placed in {loadposition}
I got stuck. I'm coding a simple module which will be placed/visible only on com_content article pages. This module fetches keywords from the current article, and to avoid an additional database query ...
2
votes
0
answers
697
views
How to access a component variable from a module? [closed]
I want to access a component variable (a simple array) from a module without using session (no persistence across page loads necessary in my case), JRequest/JInput, global, plugin nor model.
Is it ...
5
votes
3
answers
1k
views
Load javascript script before </body> closing tag
I'm using $doc->addScript($path.'/js/script.js'); to load a Javascript file inside the head section. Is there any native way to load it in the bottom of the page, before the closing </body> ...
2
votes
1
answer
1k
views
Stop Joomla! 3.4.1 from including scripts in custom component pages [duplicate]
I'm trying to prevent Joomla! 3.4.1 from loading certain default scripts in the front-end template when a custom component is displayed. I am excluding the scripts in the template index.php file as ...
2
votes
1
answer
702
views
How to set html5 property within template.php
Apologize for my bad php knowledge, how to set html5 flag for the current document? Something like:
$document->setHtml5(true);
This to be executed in template.php where we do not have $document.
...
2
votes
2
answers
1k
views
Changing order of javascripts on load
I have written my own template and some part of the content is as the following:
<?php
// Add JavaScript Frameworks
JHtml::_('bootstrap.framework');
// Add Stylesheets
JHtmlBootstrap::loadCss();
/...
3
votes
1
answer
417
views
Load css file using absolute path for my component?
My site has configured multilanguage, i develop now a small component and need physical path of my component, and if i use JPATH_COMPONENT_ADMINISTRATOR then i get still
http://example.com.com/...
10
votes
1
answer
10k
views
Add JavaScript with $doc->addScript with async="true"
is it possible to use the addScript with async="true"?
I found a hack that uses some clever quoting to trick the embed function, but it seems as if this could be a native feature:
$doc->addScript(...