Override template result of joomla.searchtools.default Topic is solved

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.
Post Reply
webkaiba
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Fri Mar 18, 2016 10:57 am

Override template result of joomla.searchtools.default

Post by 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! Ace
Joomla! Ace
Posts: 1342
Joined: Fri Jul 05, 2013 10:35 am
Location: Unknown

Re: Override template result of joomla.searchtools.default

Post by SharkyKZ » Fri Jun 15, 2018 6:48 am

/layouts/joomla/searchtools/default.php

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

Re: Override template result of joomla.searchtools.default

Post by 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! Explorer
Joomla! Explorer
Posts: 410
Joined: Thu Jan 12, 2017 10:13 am

Re: Override template result of joomla.searchtools.default

Post by 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: 11
Joined: Fri Mar 18, 2016 10:57 am

Re: Override template result of joomla.searchtools.default

Post by 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! Explorer
Joomla! Explorer
Posts: 410
Joined: Thu Jan 12, 2017 10:13 am

Re: Override template result of joomla.searchtools.default

Post by 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! Master
Joomla! Master
Posts: 10099
Joined: Thu Feb 15, 2007 5:48 am
Location: Oxford, UK
Contact:

Re: Override template result of joomla.searchtools.default

Post by 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! Explorer
Joomla! Explorer
Posts: 410
Joined: Thu Jan 12, 2017 10:13 am

Re: Override template result of joomla.searchtools.default

Post by KianWilliam » Thu Jun 21, 2018 10:37 am

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


Post Reply

Return to “Templates for Joomla! 3.x”