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

TOPIC:

Create new Menutype - iItemsByCategory 13 May 2013 10:40 #7177

How can i add a new menutype to my component to show all items from a category that i can select in the menu.

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

Create new Menutype - iItemsByCategory 23 Sep 2013 22:34 #11169

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Coding is now a piece of cake

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

Create new Menutype - iItemsByCategory 27 Sep 2013 14:31 #11202

Um...
Missing from tonights build???

Have uninstalled old component and reinstalled fresh build (J3 Build)
Admin Layout Side has filter with all FKs of table

When Creating a menu Item
No FK - Category option displayed

Just checking my project at the moment
- i did notice that my backend default view was alias was "default"
- but the radio button "is default" was not selected

Just rebuilding and reinstalling now - i will confirm outcome

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

Create new Menutype - iItemsByCategory 27 Sep 2013 14:58 #11203

---- DONT WORRY :lol: I found It!!! ----

OK for those that cant seem to get this to work or like me had a moment forget-fullness

To get this to work you must have a corresponding Combo Filter in the filter brick for each FK list that you wish to filter on from the menu item

That is: lets say you have a table with 4 FKs something like this

TABLE: My Books
[id] [my_book_title] [published_date] [FK=>author_id] [FK=>category_id] [FK=>location_id] [FK=>member_id]

Lets say you have a filter brick with the following combo filters defined
Authors - Categories - Locations - Members
When creating the menu item you can filter on a combination of the four FK lists (Authors - Categories - Locations - Members)

But lets say you create a filter brick for the same table with only two combo filters
Locations - Categories
When creating the menu item you can only filter by location or category

for those of you that are wondering where the code for the modal popup is located
[ROOT]/administrator/components/com_mycomponent/views/fk-field-viewname/tmpl/modal.php

NOTE: If you have changed the name of the FK-table (lets say the fk-table was [categories] and you changed its name to [book_categories])
- you may need to delete the FILTER BRICK (and regenerate) the default admin side collection layout of the view (in this case "my books")
- from my experience if you just delete the filters and not the complete filter brick the respective modal layouts may not be generated correctly

Hope this helps save some time for someone

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

Last edit: by BTB300.

Create new Menutype - iItemsByCategory 08 Oct 2013 00:19 #11321

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
I have checked again and it works even when there are no backed layouts defined.

There was such issue, but now it is fixed since 1 or 2 months already. Did you raised this issue recently ?
Coding is now a piece of cake

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

Create new Menutype - iItemsByCategory 08 Oct 2013 02:51 #11322

admin wrote: I have checked again and it works even when there are no backed layouts defined.

There was such issue, but now it is fixed since 1 or 2 months already. Did you raised this issue recently ?


Hi Admin,
Yes you are correct! - Backend layouts do not have to be defined
sorry I was running from memory when i wrote the above did not try with the current build
I will edit previous post tonight when i get a second to reflect the current build :)

I think my main problem was the fact that i had changed table names and rebuilding the filters fixed the issue

Sorry for confusion
BTB300

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

Last edit: by BTB300.

Create new Menutype - iItemsByCategory 08 Oct 2013 17:43 #11336

Hi Admin,
As promised edited the post above #11203 hopefully it reflects the current build

Just have one question (sorry have not tested)
does that mean for each FK-Combo in the filter brick that front-end collections must be defined?

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

Last edit: by BTB300.

Create new Menutype - iItemsByCategory 08 Oct 2013 17:59 #11338

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Yes.

It is creating menu filter only if a filter is defined in the concerned front layout.
If no filter exist, the model miss the functionality and the menu cannot use it, so cook does not call it.

Then you can remove those filters in template in post prod forking them
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.074 seconds
  I still don't believe he can really be human to do all this ! From all of the forums that I've ever participated in this is certainly the one that most encapsulates the feeling of being truly open source where everyone's opinions and contributions can and will shape the development of the service! It's truly awesome! Hope you enjoy cooking and look forward to reading and contributing to any of the editorial work that you proposed too!! Thanks
Gez (audibleid - JED)

Get Started