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

TOPIC:

Context Layout 21 Apr 2012 15:29 #2097

  • liubov
  • liubov's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
  • (=) 10 mn and it's ready!
  • Posts: 279
  • Thank you received: 36
Hi Joce !

In my component, backend side, I use a main filter into the grid on different pages (tabs). So I am correcting the code to keep a global context for these pages. J-cook generate a filter context depending on the layout. I would like to keep the filter value if setted, and auto selected when creating a new item. This is the native behaviour of Joomla with category filter, for example ...

May be it would not be a lot of work to add an filter option when creating the layout pages in j-cook (global or layout).

My solution to use a global filter :

views/pedigrees/view.html.php
		//Filters
		//Race > value
		$model_id_race = JModel::getInstance('races', 'JbreedmModel');
		...   ...
		$this->filters['id_race']->value = $model->getState("filter.id_race");


models/pedigrees.php
		// for $filter_id_race context never change to keep filter on each page ...
		// j-cook line: $filter_id_race = $app->getUserStateFromRequest($this->context.'filter.id_race', 'filter_id_race');
		
		
		$filter_id_race = $app->getUserStateFromRequest('filter.id_race', 'filter_id_race');

what do you think of that ?

Marc.

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

Last edit: by liubov.

Re: Context Layout 22 Apr 2012 18:33 #2102

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Liubov, nice to see you man ;-)

Yes, I had a tought about that, it could be an option.
I keep in list.
Coding is now a piece of cake

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

  • Page:
  • 1
Time to create page: 0.163 seconds

Awards for the best Joomla app. This product is gonna win an award for this amazing job. Cook Self Service is the the best application from all over the Joomla universe ! It brings Joomla to a professional level really advanced for developers. It is a real fun to develop with it. The ACL part and security checks implementation are just... so much hours saved. I can now concentrate myself more on the design part and the creative works. Thank you so much. Guys I offer you all my congratulation ! Keep up the works because Joomla is needing it to increase the quality of extensions availables on the JED. I also learned a lot because I can see how to code at the proper place and I found all my answers reading the forum.
lack_hanson (JED)
          

Get Started