Jump to content

Lister and custom selector


jsantari
 Share

Recommended Posts

I have two page fields in a template. One selects a Category from the page tree by just setting the parent. The other, Type gets it's options from the child of the Category using a custom selector - works great. However in Lister the Type field apparantly isn't able to understand the reference back to the Category as it does on the input form. The category works as I'd expect. Any way to fix this? Lister isn't very useful in this case to search if it can't handle this relationship.

Link to comment
Share on other sites

I haven't tried this with LP. I am referring to what is happening in the standard built in Lister. My first field product_category is a page select and just points to the top level of my category tree (a lookup tree). The second product_shapetype is a page select but users a custom selector as: parent=page.product_category. For data entry this works as expected populating my shapetype select with the children of the selected category. In lister the product_category works as expected displaying the top level values in the category tree. The shapetype field doesn't seem to understand the relationship and just shows the visible toplevel (below admin) pages. See attached screen shot.

post-1262-0-39449800-1437530440_thumb.jp

Link to comment
Share on other sites

there is no $page context in lister, so you are trying to do a dependent select (e.g. one select list is populated based on the setting of a separate select).

I'm not sure if lister can do dependent selects, but it would be no problem to do with a custom page list and some javascript. you would output your own filters and filter the dataTable with those custom filters; the dependent filter would populate with some ajax appending the results of the lookup after the first select is changed.

Link to comment
Share on other sites

Yes there is no page context but - it sees that the product_category uses a page selector as that one works as expected. I would think it could also see the custom selector and determine that the field it wants to use as the parent is product_shapetype. Probably a feature they need to add as an enhancement to Lister. If the client has to know what data is in product_shapetype for a given product_category it isn't going to be very user friendly to find products. Have you worked with Lister Pro and if so could a custom finder be created to handle this?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...