• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: directory list view

directory list view 9 years 7 months ago #32524

  • rmart
  • rmart's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 21
  • Thank you received: 1
in the directory menu item you can coose from 5 submissions to 'all' to show. Is there a way to set this to zero so that the page only shows the search box and the result of a search.
The administrator has disabled public write access.

directory list view 9 years 5 months ago #32964

  • rmart
  • rmart's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 21
  • Thank you received: 1
:( there has been no replies to this , does anyone know how to add a zero to the number of view options list?
The administrator has disabled public write access.

directory list view 9 years 5 months ago #32973

  • alexp
  • alexp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 2253
  • Thank you received: 180
Unfortunately there is no built in feature for this. The pagination counter is certainly not the way to go for such an implementation.

It would be best to create a template override for the directory layout and only show the results if the search term is being set.

You will have to create a template override for the following layout:

components/com_rsform/views/directory/tmpl/default.php

More on template overrides here:

https://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.

directory list view 9 years 5 months ago #32975

  • rmart
  • rmart's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 21
  • Thank you received: 1
Thanks Alex,

I have created an overide and have played around with the code. I can get the list to show empty on page load but then the search does not work and shows no results.

This is because I am simply removing the table code so nothing will show.

Have you any idea what I need to add/remove from the file to show an empty table on load but keep the search working?

Thanks
The administrator has disabled public write access.

directory list view 9 years 5 months ago #32976

  • alexp
  • alexp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 2253
  • Thank you received: 180
Instead of:
$directoryLayout = $this->loadTemplate('layout');
		eval($this->directory->ListScript);
		echo $directoryLayout;

try using this:
	if(isset($_POST['filter_search'])){
		$directoryLayout = $this->loadTemplate('layout');
		eval($this->directory->ListScript);
		echo $directoryLayout;
	}
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.

directory list view 9 years 5 months ago #32977

  • rmart
  • rmart's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 21
  • Thank you received: 1
That is great Alex, It works for me without the {} at the start and end of the original code. i e just add if(isset($_POST)) at the start of the original code.

On page load the listings are empty and the search works, however, if you reset the form, or if you click search without entering a postcode the 10 most recent submissions still appear.
The administrator has disabled public write access.

directory list view 9 years 5 months ago #32978

  • alexp
  • alexp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 2253
  • Thank you received: 180
This was just a starting point for you to implement this according to your needs. You can further customize the condition, for example:
if(isset($_POST['filter_search'])  && $_POST['filter_search'] != '')
PS: You should use the brackets.
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
Last Edit: 9 years 5 months ago by alexp.
The administrator has disabled public write access.

directory list view 9 years 5 months ago #32980

  • rmart
  • rmart's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 21
  • Thank you received: 1
Thanks for your time on this, it is greatly appreciated..

Ok,

I curently have the previous code you suggested which works as described. Good but returns the full list on reset.

if(isset($_POST))$directoryLayout = $this->loadTemplate('layout');
eval($this->directory->ListScript);
echo $directoryLayout;

If I change this to

if(isset($_POST) && $_POST != '')$directoryLayout = $this->loadTemplate('layout');
eval($this->directory->ListScript);
echo $directoryLayout;

this does not work, i just get the original view with the last 10 submissions.
The administrator has disabled public write access.

directory list view 9 years 5 months ago #32981

  • alexp
  • alexp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 2253
  • Thank you received: 180
it seems the editor removed some of the code. I made some corrections. Have a look again.

PS: I actually tested the script before posting it here, so i know for sure that it works. Just make sure that you are using the latest RSForm!Pro version as well.
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
Last Edit: 9 years 5 months ago by alexp.
The administrator has disabled public write access.

directory list view 9 years 5 months ago #32982

  • rmart
  • rmart's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 21
  • Thank you received: 1
Fantastic!

Works perfect Alex, very much appreciated.

My page for this is here if it helps anoyone else to see the result.

lraregister.co.uk/index.php/retrieve-report
The administrator has disabled public write access.
The following user(s) said Thank You: eileen

directory list view 8 years 6 months ago #35994

  • rmart
  • rmart's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 21
  • Thank you received: 1
apologies - solution found.
Last Edit: 8 years 6 months ago by rmart.
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!