25
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 interested:
Joomla Beginner Users start here:
Joomla Beginner Tutorials - How to start with Joomla?
Glossary - It's a good idea to get familiar with Joomla Glossary ...
20
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 just create it in the menu manager, so it's never visible as a true menu to the end user.
Since Joomla sees this as a real menu (even though it's not visible),...
17
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 apps front-end/back-end) and are designed to display a piece of information.
So if you open the module folder/files and start reading the code, you will ...
16
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 described on the docs here:
http://docs.joomla.org/How_to_determine_if_the_user_is_viewing_the_front_page
and do something like:
<?php
$menu = JFactory::...
15
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 you look at all the articles in the series.
http://docs.joomla.org/J3.3:Creating_a_simple_module/Introduction
http://docs.joomla.org/J3.3:...
14
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 in a tag of another table)
xhtml (divs and font headder tags)
rounded (allows for rounded corners by wrapping in nested div tags)
outline (add preview ...
answered Apr 22 '14 at 20:20
Harald Leithner
1,99322 gold badges1414 silver badges3030 bronze badges
13
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 different domain.
answered Apr 22 '14 at 18:32
Harald Leithner
1,99322 gold badges1414 silver badges3030 bronze badges
12
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 the version of this extension.
Refer Joomla Manifest for details.
12
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
+---------------------+-------------------------------------------------------------------------------------------------------+
| TYPE | DESCRIPTION ...
11
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.
11
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>
<option value="2">Option 2</option>
<option value="3">Option 3</option>
</field>
<field name="second" type="list" label="Select ...
10
Try this code:
$menu = JFactory::getApplication()->getMenu();
$parent = $menu->getItem( $menu->getActive()->parent_id );
$parentname = $parent->title
If you need the link
$parentlink = JRoute::_( $parent->link . '&Itemid=' . $parent->id );
10
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 update, and general incompatibility with other components.
What we now do is this:
New table #__content_ext with a key field that is identical to #__content and ...
10
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 sample:
<main id="content" role="main" class="main">
<?php
if ($this->countModules('myposition'))
{ ?>
<jdoc:include type="modules" ...
9
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 yourmodulposition}');
to the view file.
The second string with the load position short tag can be replaced with a var which contains more html if you need that. You don't ...
8
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 the matching script. For example when debug is enabled it will load an uncompressed version of the file if present.
There are optional settings which allow to ...
8
Instead of JDocumentRenderer you should use JModuleHelper to render modules:
foreach($modules as $mod)
{
echo JModuleHelper::renderModule($mod, $attribs);
}
See renderModule() method.
8
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.
8
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 the advanced module manager you will see a settings for Default Menu Assignment.
There are also many MANY more features with it that extend the native module ...
8
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 videos which explain how to develop various things. http://dbhurley.com/jd101-joomla-development-tutorial-series/
The API page is a good ressource as well. http://...
7
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.
7
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/akeeba/fof
What is FOF
FOF (Framework on Framework) is a rapid application development framework for Joomla!. Unlike other frameworks it is not standalone. It ...
7
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)
{
if($isnew) {
// do something
}
}
}
7
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
Scroll down to the bottom of the module position
You will now see the menu assignment options where you can assign the
module to selected pages or all pages
To ...
7
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 benefits of this file is that it keeps all the core functionality in 1 location. If a module already contains this file, 1 simple rule, do not remove it.
...
7
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. Static methods can be called without instantiating an object so there is no $this reference inside.
http://php.net/manual/en/language.oop5.static.php
Just ...
7
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 Stack Exchange.
6
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 the if($module->showtitle){} case then is this probably the soultion.
6
Found it , was missing one more override which was bellow
https://github.com/joomla/joomla-cms/blob/7d55d68cfbfe2b86589f2df9aab1771afce4fab0/libraries/cms/module/helper.php#L98.
So to sum down ,
if u wish to make own mods preview
create your preview chrome in templates/your_template/html/modules.php
override module helper class (see this ) by adding ...
6
An extension can either be a plugin or a module. It can't be both. That's due to the way modules and plugins are handled.
However you can build the two extensions and package them together and distribute as one zipfile.
See http://docs.joomla.org/Package for some documentation how packages work.
Only top voted, non community-wiki answers of a minimum length are eligible
Related Tags
module × 386joomla-3.x × 135
php × 37
module-display × 35
component × 34
joomla-2.5 × 31
plugin × 29
articles × 25
development × 24
extensions × 23
module-params × 23
custom-module × 21
joomla-3.4 × 18
templates × 18
overrides × 18
menu × 18
ajax × 16
joomla-3.3.x × 12
jquery × 12
template-override × 12
administrator × 11
custom-field × 11
javascript × 10
joomla-api × 10
database × 10