Skip to main content
9 votes

Pass var to jQuery script

After this question was originally answered, Joomla introduced in version 3.5 another way of passing variables to javascript, using the addScriptOptions() method of the Joomla Document class. So I'm ...
Robbie Jackson's user avatar
3 votes
Accepted

SQL WHERE clause with a variable (current article ID)

Your code contains several errors, including a syntax error. You should use an IDE with proper code completion and signature hints (any modern IDE should be able to do that). $query->select('value'...
nibra's user avatar
  • 263
3 votes

How do I create a new PHP variable for a blog override from the result of JDatabase join query?

Your code contains a few errors, which is why you're getting a white page. 1) $db->('f.featured_up') needs to be replaced with $db->quoteName('f.featured_up') 2) You're missing a comma (,) after ...
Lodder's user avatar
  • 26.9k
2 votes
Accepted

pass on value of id in another variable

If I understand well your question and code, you should change: Factory::getApplication()->input->get('id'); To this: Factory::getApplication()->input->get('v_id', 0, 'int'); Check ...
Carlitorweb's user avatar
1 vote
Accepted

How do I create a new PHP variable for a blog override from the result of JDatabase join query?

Firstly: the reason for the white page errors was that I was putting the code into the wrong file. Instead of adding it to blog_item.php it should be in blog.php. It worked once I'd moved the code. ...
Gillian's user avatar
  • 411
1 vote
Accepted

Session variable from a module is only accessible from the template after refresh

For this exact issue the solution was to avoid the things that are not working. So instead of trying to get the variable from the module to the template in my php I created a html variable "--...
Jonathan Schmidt's user avatar
1 vote

How do I carry a Joomla article title and its link across from an article layout into a module's helper?

You can use Factory->getDocument title and link. use Joomla\CMS\Factory; $doc = Factory::getDocument(); $title = $doc->getTitle(); $url = $doc->getLink();
Fabiano S. Figueiredo's user avatar
1 vote

Where do I define custom global variables in my Joomla project?

See the documentation for Adding Configuration Parameters. This then makes your configuration parameters available via the params, these can be obtained anywhere using the JComponentHelper class or ...
Grant G's user avatar
  • 714
1 vote

How to SET a user-defined MySQL variable and increment it to produce ranking values with JDatabaseQuery?

Joomla syntax aside, let's start by explaining your desired action. You want to apply an incrementing counter to a specific column for all rows in the table. This is a very reasonable and common ...
mickmackusa's user avatar
  • 4,846
1 vote

Params in Custom Component List View

Addendum: OP wants the menu item params accessible in the view, but he tries to override the component params var ($this->params) with the menu item params object/class. Which is unnecessary ...
Dennis Heiden's user avatar
1 vote

Params in Custom Component List View

You are getting $params from $state $state = $this->get('State'); This means the state must have $params populated in your model. Check if you are populating the $state with $params in your ...
Nagarjun's user avatar
  • 3,001
1 vote
Accepted

Params in Custom Component List View

It looks like you are trying to get the menu parameters for your current active menu. Try the following code, this hasn't been tested, I am giving you this reference from memory. $app = JFactory::...
Terry Carter's user avatar
  • 1,834

Only top scored, non community-wiki answers of a minimum length are eligible