× Please submit new Bug Reports on GitHub: github.com/Jensen-Technologies/component-creator-issues/issues

Category select-list on frontend

9 Jahre 5 Monate her #489 von Attila Égető
Category select-list on frontend wurde erstellt von Attila Égető
Hi!

I'm relatively new in Joomla development, but this stuff makes life much easier.
Now, I'm developing a downloader component in J!25. The administrators can upload apps, documents, etc on the backend, and users can download it on frontend. The admins can create categories, which helps the users to decide what kind of thing sits on the other side of the "Download" link. I've used J_Category field type for this, and checked to show it on the list view, and also checked the Include field in text based searches and Add a filter for this field on the list view options.

I had some problem with the text based search, because it found nothing searching to the category names. This is because the query string searches in the custom component's table, but, because with J_Category, it is a foreign key, it stores only the id from the native Joomla #__categories table. So, if i've searched to pdf, it returned nothing, but a search to 13 (which is the id of the pdf category in the #__categories table) returned the items in the category. OK, it wasn't hard to modify the query string from a.category to category.title, but if somebody not familier with SQL, it would be hard, so maybe it would be useful to automatically generate the query string in this way. It's only a tip, maybe there's a reason  not to do so.

My second problem is with the Add a filter for this field on the list view option. I've checked it, and got a nice select-list on the back-end, but nothing on front-end. It would be useful, if users can select from the list only the category they want to search in, but I've didn't found a solution for this. I've tried to copy and modify the code from the backend version, but it didn't worked. Maybe someone has a solution?

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Ladezeit der Seite: 0.474 Sekunden
Powered by Kunena Forum

Wir verwenden eigene Cookies und Cookies von Drittanbietern, um Ihr Nutzererlebnis zu verbessern und Ihnen einen optimalen Service zu bieten. Wenn Sie die Website weiter nutzen, gehen wir davon aus, dass Sie mit unserer Cookie-Politik einverstanden sind.