New answers tagged

0

The solution is to add a function to your view.html.php file of your component The function will: Get url parameters Retrieve the name/title of the current page from the database and add a new item to the path with the addItem() method. The function: /* Function to add a new item to the breadcrumbs. The function name can be ...


0

What you could do is create a couple of custom form fields which restrict the categories in the way you want. Then write a plugin which will trigger on onContentPrepareForm and change the relevant form fields to the custom ones. Start with the existing category form field code in administrator/components/com_categories/models/fields/categoryedit.php. You ...


0

The difference is that with grid.sort you have basic ordering and searchtools.sort you have more options such as search field, search by published items, unpublished items, trashed items and more. Both can be used in the backend but searchtools.sort is more recommended since you have more options.


2

I see that Sharky has presented the best/correct solution, but I'd like to take a moment to build a bit of understanding around this occurrence. For the record, date is a MYSQL Keyword, but not a Reserved Keyword, so no quoteName() calls are necessary. First, what is the query that your script is generating... SELECT date FROM lmnop_db_reports WHERE 'date ...


1

It's because of this: Since some categories only have one article, some menu ("Que décrire ?", "Que prélever ?",...) are "single article" menu. You don't have a menu item created for these categories.


1

Yes, disable all unused components In the Joomla back-end via Extensions > Manage > Manage click [Search Tools] button and select: Unprotected + Administrator + Component Select all unused components (probably banners, contacts, newsfeeds) and click "disable". Do not uninstall, just disable them.


0

You can disable some unused components in Extension Manager.


2

The expression should not be quoted. ->where('date < NOW() - INTERVAL 30 DAY')


1

Most form views in core components have custom Joomla.submitbutton() functions. Standard function does indeed support only adminForm as form ID. Instead you can use Joomla.submitform() and pass your form: <button class="btn btn-primary" type="button" onclick="Joomla.submitform('controller.send', this.form)" >Send</button>


1

I did manage to solve it in the end, although I still have no idea why the inline code - which was added by Firefox, not me - was added. I compared the html/css class code for the menu with another menu that wasn't doing the same thing. This code was faulty: <nav id="topmenu"> <?php if ($this->countModules('mainmenu')) : ?> <...


0

Rename htaccess.txt to .htaccess (as @Midhat said) htaccess is needed to make your urls friendly. It comes with a ."txt" extension by default. Make sure your server has mod rewrite on To enable mod rewrite open your httpd.conf file (in your server folder) search for mod_rewrite. If there's any "#" in front of mod_rewrite, take it out and save ...


1

Assuming you're using the Form API, add buttons="true" attribute to your editor field. Example from article form: <field name="articletext" type="editor" label="COM_CONTENT_FIELD_ARTICLETEXT_LABEL" description="COM_CONTENT_FIELD_ARTICLETEXT_DESC" filter="JComponentHelper::filterText" buttons="true" />


0

I'm not sure if i got it right but you can try changing the core files of the menu and try to remove the inline css code (if that is causing the problem). You can yet add media queries to your css file to verify the screen size and apply different translate 3D effects (or any other style) to your menu. The core files of your menu usually lie in modules\...


1

You have to create a router for your component for JRoute::_() to do anything. See Supporting SEF URLs in your component documentation. I suggest looking specifically at Simple View-based Example which uses a new way of working with routing.


0

I have found a solution: 1 . Verify your table file (make sure the table and the class name is correct). 2 . Make sure your class (in table file) extends JTable and not JTableNested if you don't need parent_id. 3 . Verify all of your class and table names. 4 . Make sure your database user has permissions. You can also uninstall and reinstall your ...


0

There is no code for managing data in this table. You have to write your own plugin for this. You can take a look at User - Profile plugin for example.


0

Resolved! This is a working php code to compare current date to article created date: $date1 = new DateTime(); $date2 = new DateTime($article->created); if ($date1 > $date2) echo $date1->format("Y-m-d") . " is latest than " . $date2->format("Y-m-d"); else echo $date1->format("Y-m-d") . " is older than " . $date2->format("...


0

I couldn't find anything that did what I wanted so I built one. I hope this may help other Joomla devs. https://github.com/thinkerytim/joomla-docker This allows you to create a LAMP Docker container on your local dev machine, fully installed and with Joomla ready to roll (no need to do the Joomla setup via the web installer) and with your component ...


0

I'll assume you're using an inline script inside a PHP file. Depending on how you're fetching the creation date of the article, you may need to make some minor modifications: // Get the creation date of the article // This may need to be changed according to your requirements $creationDate = $this->item->created; Joomla\CMS\Factory::getDocument()->...


0

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 by using the Joomla input functionality described in https://docs.joomla.org/Retrieving_request_data_using_JInput as that provides capability for filtering out ...


0

You might want to have a look at joomlatools/console from joomlatools team to install joomla via cli using composer installed in your container. joomlatools/console


Top 50 recent answers are included