Override template result of joomla.searchtools.default

Everything to do with Joomla! 3.x templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
webkaiba
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Fri Mar 18, 2016 10:57 am

Override template result of joomla.searchtools.default

Postby webkaiba » Thu Jun 14, 2018 9:40 am

I have this function working on a listing view of users in Joomla backend:

JLayoutHelper::render('joomla.searchtools.default', array('view' => $this));
I want to change the placement of some elements like shown on the attached image:

Example:

Image

But I don't know in which place I have to do the override to make sure the filters appears in the desired order.

Thanks in advance.

SharkyKZ
Joomla! Guru
Joomla! Guru
Posts: 922
Joined: Fri Jul 05, 2013 10:35 am
Location: Unknown

Re: Override template result of joomla.searchtools.default

Postby SharkyKZ » Fri Jun 15, 2018 6:48 am

/layouts/joomla/searchtools/default.php

webkaiba
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Fri Mar 18, 2016 10:57 am

Re: Override template result of joomla.searchtools.default

Postby webkaiba » Wed Jun 20, 2018 10:08 am

SharkyKZ wrote:/layouts/joomla/searchtools/default.php


Thanks for the answer.

I have made an override based on that file and it works fine.

KianWilliam
Joomla! Intern
Joomla! Intern
Posts: 67
Joined: Thu Jan 12, 2017 10:13 am

Re: Override template result of joomla.searchtools.default

Postby KianWilliam » Wed Jun 20, 2018 10:57 am

If joomla becomes updated, this override shall be changed back, true or false?
Kian William

webkaiba
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Fri Mar 18, 2016 10:57 am

Re: Override template result of joomla.searchtools.default

Postby webkaiba » Wed Jun 20, 2018 11:39 am

KianWilliam wrote:If joomla becomes updated, this override shall be changed back, true or false?
Kian William


No.

If you put it in your template "html" directory with the same path, the updates will not affect the override, because the file is in another folder.


The only thing that can happen is if Joomla changes the data struct passed to the layout, the override will stop working.

KianWilliam
Joomla! Intern
Joomla! Intern
Posts: 67
Joined: Thu Jan 12, 2017 10:13 am

Re: Override template result of joomla.searchtools.default

Postby KianWilliam » Thu Jun 21, 2018 5:07 am

Yes, I thought you were going to change the core file rather than put it in html folder, In regard with template override, from what I 've learnt up until now, those files under tmpl folder could be overridden in html folder of template, in this path, /layouts/joomla/searchtools/default.php there is no tmpl folder, yet according to what you said, it works then Any layout file could be overridden and it is not a function of tmpl folder existance. Thanks
Kian William

User avatar
toivo
Joomla! Exemplar
Joomla! Exemplar
Posts: 9386
Joined: Thu Feb 15, 2007 5:48 am
Location: Nottingham, UK
Contact:

Re: Override template result of joomla.searchtools.default

Postby toivo » Thu Jun 21, 2018 5:45 am

Here is the tutorial about layout overrides in the html folder of the template:
https://docs.joomla.org/Layout_Override ... _Overrides
Toivo Talikka, Global Moderator
my first programs were assembled and run in 16KB :)
troubleshooting smtp and other articles https://talikka.com/joomla

KianWilliam
Joomla! Intern
Joomla! Intern
Posts: 67
Joined: Thu Jan 12, 2017 10:13 am

Re: Override template result of joomla.searchtools.default

Postby KianWilliam » Thu Jun 21, 2018 10:37 am

The link is informative, JLayout Microlayout overrides, I should try it.
Kian William


Return to “Templates for Joomla! 3.x”

Who is online

Users browsing this forum: No registered users and 5 guests