Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Menu item when user invovled 20 May 2015 18:24 #13130

  • MorganL
  • MorganL's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 438
  • Thank you received: 53
If a user is set as a filter in a grid view, you have an option when you create the menu item to select the user you want to filter by

Can we have an extra option

- Dynamically filter by LOGGED IN USER at the time the menu item is clicked i.e JFactory::getUser();

Using ACL and some minor code changes this can be achieved but it would be sweet if we just had a menu item that did it. This allows us to have a dynamic filter that pulls off record auto filtered by whoever is logged in which for me has a lot of great uses as my last few projects have been callout systems, booking systems etc
Morgan Leecy MCSE

Novell / Linux
PHP. MYSQL, Apache, node.js
Coldfusion, JQuery, HTML5
Joomla

Please Log in or Create an account to join the conversation.

Last edit: by MorganL.

Menu item when user invovled 20 May 2015 18:27 #13131

  • MorganL
  • MorganL's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 438
  • Thank you received: 53
um.. i think I am being stupid, that already looks in place... NO WAY! If that is the case I am cracking champagne.. um.. well tomorrow I am as I am on call tonight
Morgan Leecy MCSE

Novell / Linux
PHP. MYSQL, Apache, node.js
Coldfusion, JQuery, HTML5
Joomla

Please Log in or Create an account to join the conversation.

Menu item when user invovled 20 May 2015 18:56 #13132

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Yes, it is already in place. (for lists only)
$model->setState('filter.the_user', 'auto')

EDIT : And for menu item, just click on the user icon, it will select 'Auto'
Coding is now a piece of cake
The following user(s) said Thank You: MorganL

Please Log in or Create an account to join the conversation.

Last edit: by admin.

Menu item when user invovled 20 May 2015 19:35 #13133

  • MorganL
  • MorganL's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 438
  • Thank you received: 53
That really is an amazing functionality, I always though AUTO was just to take the id of the person logged into admin, never thought to click it.

This has saved me a LOT of time!
Morgan Leecy MCSE

Novell / Linux
PHP. MYSQL, Apache, node.js
Coldfusion, JQuery, HTML5
Joomla

Please Log in or Create an account to join the conversation.

Menu item when user invovled ( New Question ) 28 Aug 2015 07:52 #13424

Hi, I have set the menu item to filter by user name ( created by ) . But after entering a new item the list view defaults back to all. How do I get it to stay as the current user?? I've tried putting in the code above but get an error.

Fatal error: Call to a member function setState() on a non-object in /home/safer180/public_html/components/com_chemicals/views/chemregister/tmpl/default_grid.php on line

Man I wish I had more time to learn the code properly.

Please Log in or Create an account to join the conversation.

Last edit: by jonathanbell.
  • Page:
  • 1
Time to create page: 0.234 seconds

This is what you call a component builder. I was able to master using this in a very short time and the resulting component works like a charm. Not just a basic component builder but a fully working component builder with forms fields tables all ready to go. You can make the list and item views to display in the front and back end. Also there is a great forum just starting to evolve and I'm sure this will grow very rapidly when you all realise how good this tool is.
Kevin (JED)

         

Get Started