Hot answers tagged

26 votes
Accepted

Joomla 3.x extension development tutorial for a beginner developer

I will provide the list of my bookmarked links and a list with links for Joomla Development Books, with various resources all around Joomla Development. I hope they will be useful for anyone ...
user avatar
  • 19.5k
20 votes
Accepted

How can I control the module display on pages with no menu item?

Solution 1 : hidden menu If your pages also need pretty sef urls, you can make a hidden menu and link those articles in the hidden menu. A hidden menu means that you don't create a module for it, you ...
user avatar
  • 2,366
17 votes
Accepted

How to develop a Joomla module?

Learning Joomla Module Development The way I learned, was by studying and customizing the core or other 3rd party modules. Modules as concept are simpler than the components (which we could say are 2 ...
user avatar
  • 19.5k
16 votes
Accepted

How to create page only with modules and no component?

There isn't really a 'better way' than that. The only other option is to check whether you're on the homepage in your template file. To check if you're on the homepage you can use the method ...
user avatar
15 votes

How to develop a Joomla module?

Have you seen the following tutorials in the joomla documentation? http://docs.joomla.org/J2.5:Creating_a_simple_module http://docs.joomla.org/J3.3:Creating_a_simple_module In particular, make sure ...
user avatar
14 votes
Accepted

What are the module styles?

By default you could use the following styles: none (output raw module content) html5 (chosen html5 tag and font headder tags) table (wraps the module in a table) horz (wraps the tabled module output ...
user avatar
14 votes
Accepted

How do I generate a SEF URL in a custom module instead of the real URL?

Use JRoute for this: rtrim(JUri::base(), '/') . JRoute::_(ContentHelperRoute::getArticleRoute( $article->id, $article->catid )) but you don't need JUri::base() if you don't want to link to a ...
user avatar
12 votes
Accepted

Meaning of the "version" in any extension XML manifest file

First version tag specifies the xml version. Please refer W3 standards for XML Second version tag identifies the version of Joomla for which this extension is developed. And third version stands for ...
user avatar
  • 1,791
12 votes
Accepted

Available fields in Joomla XML manifest

Numerous types of form field are built into Joomla, with many usefull fields like calendar, color picker, image picker, file upload, file selection etc.: Available Fields +---------------------+-------...
user avatar
  • 13.3k
11 votes
Accepted

Module parameters in main tab

Use <fieldset name="basic"> instead of <fieldset name="options" label="My Parameters"> Then name of fieldset must be basic otherwise it will create a new tab.
user avatar
  • 467
11 votes
Accepted

How to conditionally show fields in module xml?

You can use Joomla's showon attribute in your field. Here's an exmaple: <field name="first" type="list" label="Select Something"> <option value="1">Option 1</option> <...
user avatar
  • 26.5k
10 votes
Accepted

Custom menu get title of the active menu's parent item

Try this code: $menu = JFactory::getApplication()->getMenu(); $parent = $menu->getItem( $menu->getActive()->parent_id ); $parentname = $parent->title If you need the link $parentlink ...
user avatar
  • 225
10 votes

How to modify article structure?

I believe I have your solution, but do NOT hack the core. We felt forced to do that over the years, and we're still paying the price even today, missing updates, revisiting hacks everytime we do ...
user avatar
  • 7,665
10 votes
Accepted

How to display module in component area

I have done this by creating a module position at the same location with the component and checking if a module is present at this position then display it, otherwise go for the component: Code ...
user avatar
  • 19.5k
10 votes

How to display module in component area

To enhance the given answers here: To include a modul position in your component view and to load modules there, you just have to add echo JHtml::_('content.prepare', '{loadposition ...
user avatar
8 votes
Accepted

What's the difference between JHtml:script() and $doc->addScript?

JHtml::script has additional logic included. See http://api.joomla.org/cms-3/classes/JHtml.html#method_script for the API reference By default it will detect debug setting and browser used and load ...
user avatar
  • 5,527
8 votes

Which class method should I use for deprecated JDocumentRenderer->render();

Instead of JDocumentRenderer you should use JModuleHelper to render modules: foreach($modules as $mod) { echo JModuleHelper::renderModule($mod, $attribs); } See renderModule() method.
user avatar
  • 4,045
8 votes

How can I control the module display on pages with no menu item?

You can't do it with default Joomla. Only by menu item. Take a look at advanced module manager by RegularLabs which gives you more assignment options.
user avatar
8 votes
Accepted

Default menu assignment for a new module

Advanced Module Manager by nonumber allows this http://www.nonumber.nl/extensions/advancedmodulemanager I do not know if the free version includes it but I would assume it would, in the Options for ...
user avatar
8 votes

Joomla 3.x extension development tutorial for a beginner developer

I can recommend the official doc page. There is a section for developers which includes also tutorials. http://docs.joomla.org/Portal:Developers David Hurley is currently doing a series of short ...
user avatar
  • 5,527
7 votes

Copying Joomla Menu Items and keeping Module assignements

You can't do that as modules are assigned to a menu item id and saving a menu item as new will give it a new menu Id which no modules are assigned to. Moving an item will keep its id but not copying.
user avatar
7 votes

Joomla 3.x extension development tutorial for a beginner developer

Previous answers are comprehensive about Joomla Core MVC. As an alternative MVC for Joomla, FOF https://www.akeebabackup.com/documentation/fof/introducing-fof.html#what-is-fof https://github.com/...
user avatar
  • 7,415
7 votes
Accepted

Folder create when user register joomla website?

If you write a small User Plugin, you can use something like this to create the folder. class PlgUserExample extends JPlugin { public function onUserAfterSave($user, $isnew, $success, $msg) { ...
user avatar
  • 7,665
7 votes
Accepted

How to assign a module to different pages

To assign modules to pages; Joomla 2.5 instructions Log into the Joomla administrator area of your site Select the Extensions menu and Module manager menu Open the module/menu you have created ...
user avatar
  • 3,501
7 votes
Accepted

Where to place code in Joomla modules

helper.php: This file is where all your functions belonging to a class should go. It's basically the module version of a model for a component, so tasks such as performing database queries etc. The ...
user avatar
  • 26.5k
7 votes
Accepted

How to get module parameters inside helper function and how to get params inside a custom form field type?

1. How to get Modules parameters inside Helper Function You are going all wrong with this. First, you can't use $this inside a static method, because they are independent of any instantiated object. ...
user avatar
  • 19.5k
7 votes

How to get module parameters inside helper function and how to get params inside a custom form field type?

I much prefer going for the OOP approach. This is what I use in one of my extensions. It's Ajax based so I have a separate function to get the parameters. helper.php: class ModSomethingHelper { ...
user avatar
  • 26.5k
7 votes
Accepted

How can I make a site like StackExchange with Joomla?

Theres a whole Questions and Answers category in the JED including: JE Stack Exchange (free) JE Stack Exchange Pro (paid) Minitek Discussions Pro (paid) which seem to have the basic functionality of ...
user avatar
7 votes

What does "Prepare Content" do and when should it be used?

Prepare Content will enable the onContentPrepare plugins event for the content of the module. So the custom html module's html content will go through the process of content plugins, similar to what ...
user avatar
  • 19.5k
6 votes
Accepted

Show/hide module title not working

Check this: joomlaroot/templates/yourtemplate/html/modules.php and search for something like this: if($module->showtitle){echo $module->title;} Is there only echo $module->title; without ...
user avatar

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