Skip to main content
7 votes
Accepted

Joomla Terminology: view, layout, task and component development

Running ahead a little bit let me provide you with link to JooYii Library. This library makes a leap ahead brings some practices that would be at Joomla! 4 to current Joomla! 3.x branch along with ...
Alexandr's user avatar
  • 1,130
3 votes
Accepted

How does Joomla Generate a Page When the View is Excluded?

Displaying a view is really executing display task of the main controller. Therefore, view parameter is only specific to display task, it is not used by other controllers/tasks. Core components are ...
Sharky's user avatar
  • 12k
3 votes
Accepted

Documentation tutorial: Why is my JFormFieldList showing a textbox?

The problem is that it is not able to get the field. I see filename you have defined as ulwiz_wmode.php and in class name you are using this JFormFieldUlWiz_WMode. Make sure the naming convention is ...
Liz.'s user avatar
  • 1,385
3 votes
Accepted

Toolbar not displayed in my Joomla MVC component

Toolbar isn't really supported in frontend. In backend it's rendered by mod_toolbar module which is only available in backend. You can still render the toolbar in frontend using this code but it may ...
Sharky's user avatar
  • 12k
3 votes
Accepted

Joomla correct way of routing

You should run the URL through Joomla\CMS\Router\Route::_() before passing to setRedirect() to get the correct SEF URL since none of the involved methods do that automatically. use Joomla\CMS\Router\...
Sharky's user avatar
  • 12k
3 votes
Accepted

Why does Joomla have both models and tables?

Class JTable is created to work strictly on database object. Table object should create,modify,delete,check data in database. It can be used in many models, helpers, modules. Single model some times ...
Artur Stępień's user avatar
2 votes

How can I can get the new record ID after saving data with JModel?

Even though this is an old post. I wanted to post one of the solutions that helped me. JLoader::import('group', JPATH_ADMINISTRATOR.'/components/com_users/models'); $groupModel = JModelLegacy::...
Irfan's user avatar
  • 167
2 votes

Create a User Area

Two questions: Do you want your users log in front or backend of your site? The workflow is a little different for each scenario. What user functionality you want?, or want to extend?, once the user ...
AlejandroVega's user avatar
2 votes
Accepted

View only showing one row from sql result set

The good news is that this is a very basic task. I would pass the entire players result set to your view via $this->_item->players. $query ->select("*") ->from($db->qn(...
mickmackusa's user avatar
  • 4,846
2 votes

Sharing a model between two views in a component

OK, comments are not the easiest place to talk in details (too short, too easy to misinterpret) so I'll post this here. It may be a bit wide-ranging and high-concept at first b/c of the lack of detail ...
Arlen's user avatar
  • 802
2 votes

For how long will legacy component MVC structure work in Joomla?

My understanding is I don't believe it will 'stop working'. The new structure is guideline or preferred structure that brings Joomla inline with other frameworks. You can have whatever structure you ...
Irata's user avatar
  • 4,361
2 votes

Joomla 4 API MVC Layer type

You can use virtually any component structure you want as long as Joomla can dispatch the component. You can use the J3 style single entry file. You can use the J4 service provider while still using ...
Sharky's user avatar
  • 12k
1 vote

For how long will legacy component MVC structure work in Joomla?

According to information from volunteers over at the Joomla Mattermost community, the most up-to-date information is the one found in code comments. I received this link to Joomla's code that ...
mavrosxristoforos's user avatar
1 vote
Accepted

I want to display a form with the data added already

There is a method $form->setProperty() which does this.
DeesreX's user avatar
  • 87
1 vote

Sharing a MVC resources library between two components

First of all, you're using different file structure and class naming conventions than Joomla! core. This won't work without rewriting related methods such as controller's getView(). That said, using ...
Sharky's user avatar
  • 12k
1 vote

Display the component view or layout into a module

I would program a custom module for this purpose. In its helper file I would load the Model of your component to retrieve the items that you will display. Check out a Joomla core module like /...
pe7er's user avatar
  • 2,088
1 vote
Accepted

Get user id from user form field type

Here is the code you would put in your models/forms XML file: <field name="modified_user_id" type="sql" label="JGLOBAL_FIELD_MODIFIED_BY_LABEL" description="...
Terry Carter's user avatar
  • 1,834
1 vote

How can I create a custom attribute/property on a model?

Table You can modify a Table object (usualy in /administrator/com_yourcomponent/tables/property.php) of this Property to set the is_sold property in load method right after parent::load(). Model Other ...
Artur Stępień's user avatar
1 vote

How can I show an alternate layout for my view in an MVC component?

I have been fighting the same problem for two full days now, going over lesson 10 of Robbie Jacksons excellent video explanations in this series https://docs.joomla.org/J3.x:...
SoaringBird's user avatar
1 vote
Accepted

How can I show an alternate layout for my view in an MVC component?

The approach given above seemed like it should work because it does. However, if your class is a little more complex than my example and you have a __construct() function don't forget to call parent::...
glenatron's user avatar
  • 239
1 vote

Retrieve the value of a line a checkbox

Yes, the ids of those records that have been checked will be sent in the HTTP POST request within a param array named cid. You can retrieve them via $_REQUEST['cid'], but it's safer to retrieve them ...
Robbie Jackson's user avatar
1 vote

How to set the view location in Joomla 4

The view file that your component is looking for MycomponentViewViewname which was used in the Joomla 3, so make sure you are extending the right controller class in your Controller(i.e Joomla\CMS\MVC\...
Pratyush's user avatar
  • 496
1 vote

Edit a record saves a new record with updated fields

In the view of your component. components->com_mycom->view->tmpl->default.php (or edit.php, some.php) depending on your needs. <form action="<?php echo JRoute::_( 'index.php?option=com_student&...
MaXX's user avatar
  • 181
1 vote

How to query and display a list of nested tags for a particular parent on front end as links?

<?php defined('_JEXEC') or die; // Joomla $parent_tag_id=12345; // your tag id here JLoader::register('TagsHelperRoute', JPATH_BASE . '/components/com_tags/helpers/route.php'); $tags_tree=JTable::...
Marcel's user avatar
  • 35

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