15

Many of our component's parameters depend on external conditions, so we need to periodically change them with some overnight processing. Here's the code we use (adapted for use with com_content). // Load the current component params. $params = JComponentHelper::getParams('com_content'); // Set new value of param(s) $params->set('show_title', 1); // ...


2

Use the following: $menu =& JSite::getMenu(); $activeMenu = $menu->getActive(); $Itemid = $activeMenu->id; or $menu =& JSite::getMenu(); $activeMenu = $menu->getActive(); $Itemid = $activeMenu->query['Itemid']; To get your message being passed you need to retrieve it from the application input $...


2

After some testing, I was able to replicate the issue: **A form redirects to a view without a menu item or redirects to itself relatively to a url like this one: component/mycomponent/myview (It doesn't matter if the view has a menu item or not, this is just stupid Joomla routing.)** Therefore the following has to be done to prevent the error: 1) the ...


2

These options are generated (only) by extensions created with component-creator.com.


2

Here is a quick bit of code that will retrieve the category name for you. This code assumes that you are on an article page. <?php $JInput = JFactory::getApplication()->input; $articleId = $JInput->get('id','','int'); $categoryName = getCategoryName($articleId); echo $categoryName; function getCategoryName($articleId) { $db = JFactory::...


2

Here's what you can do to accomplish what you want: Override the login page to include the additional fields (such as the styles, etc...) Create a different login plugin (just copy the authentication/joomla plugin) and use that plugin instead of the default one. In the onUserAuthenticate function of that plugin, just add the code to store the additional ...


1

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 complicated. In the core article component, the component and the menu item params are merged (in the view.html.php), which is cool if you are trying to override some ...


1

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 model's populateState function protected function populateState($ordering = null, $direction = null) { $params = JComponentHelper::getParams('com_mycomponent');...


1

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::getApplication(); $params = $app->getMenu()->getActive()->getParams(); That may work for the current active menu parameters. If not you may have to pass ...


1

I got to solve this via: setting the parametters in the Administrator Web Side -> Menus -> Edit Item -> 'Portada' (Inicio) -> Details, Category and Options Tabs Content ->Articles-> Edit Category -> 'Portada' -> Options Tab -> Alternative Layout (List)


1

To get Menu Params This one is perfect I was searching few hrs and this solve my issue of Joomla 3.6.5 & PHP 7.1 0: Using $this when not in object context Solution: $app = JFactory::getApplication(); $menu = $app->getMenu(); $active = $menu->getActive(); $itemId = $active->id; $menuparams = $menu->getParams($itemId);


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