Questions tagged [jdocument]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer

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 My problem is that while other metadata shows correctly on the frontend pages, the <meta name="...
dhany saguntoro's user avatar
0 votes
0 answers

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 {' . '...
Jonathan Schmidt's user avatar
1 vote
2 answers

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 ...
TVBZ's user avatar
  • 213
3 votes
0 answers

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 ...
jonboy's user avatar
  • 3,563
0 votes
2 answers

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/...
Eoin's user avatar
  • 1,889
1 vote
2 answers

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 ...
Ekta Puri's user avatar
  • 135
6 votes
2 answers

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: $...
antimatter's user avatar
1 vote
1 answer

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 ...
John Rix's user avatar
  • 547
2 votes
2 answers

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 ...
Beshur's user avatar
  • 31
2 votes
0 answers

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 ...
Aung Myo Linn's user avatar
5 votes
3 answers

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> ...
webchun's user avatar
  • 2,418
2 votes
1 answer

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 ...
Zachary Draper's user avatar
2 votes
1 answer

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. ...
Plamen's user avatar
  • 745
2 votes
2 answers

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(); /...
zkanoca's user avatar
  • 533
3 votes
1 answer

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
jExchange's user avatar
  • 125
10 votes
1 answer

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(...
user101289's user avatar
  • 1,119