Welcome, Guest
Username: Password: Remember me

TOPIC: [ADDED] Create new Menutype - iItemsByCategory

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

  • asdf1234A
  • asdf1234A's Avatar
  • Offline
  • New Member
  • Posts: 2
  • Karma: 0
How can i add a new menutype to my component to show all items from a category that i can select in the menu.
The administrator has disabled public write access.

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

  • admin
  • admin's Avatar
  • Online
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
Coding is now a piece of cake
The administrator has disabled public write access.

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

  • BTB300
  • BTB300's Avatar
  • Offline
  • Moderator
  • Posts: 414
  • Thank you received: 130
  • Karma: 46
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
The administrator has disabled public write access.

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

  • BTB300
  • BTB300's Avatar
  • Offline
  • Moderator
  • Posts: 414
  • Thank you received: 130
  • Karma: 46
---- 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
Last Edit: 08 Oct 2013 17:02 by BTB300.
The administrator has disabled public write access.

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

  • admin
  • admin's Avatar
  • Online
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
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
The administrator has disabled public write access.

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

  • BTB300
  • BTB300's Avatar
  • Offline
  • Moderator
  • Posts: 414
  • Thank you received: 130
  • Karma: 46
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
Last Edit: 08 Oct 2013 02:58 by BTB300.
The administrator has disabled public write access.

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

  • BTB300
  • BTB300's Avatar
  • Offline
  • Moderator
  • Posts: 414
  • Thank you received: 130
  • Karma: 46
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?
Last Edit: 08 Oct 2013 17:46 by BTB300.
The administrator has disabled public write access.

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

  • admin
  • admin's Avatar
  • Online
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
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
The administrator has disabled public write access.
Time to create page: 0.114 seconds

Get Started