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

Category select-list on frontend

9 años 5 meses antes #489 por Attila Égető
Category select-list on frontend Publicado por 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?

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Tiempo de carga de la página: 0.157 segundos
Gracias a Foro Kunena

Utilizamos cookies propias y de terceros para mejorar nuestros servicios y mostrarle publicidad relacionada con sus preferencias mediante el análisis de sus hábitos de navegación. Si continua navegando, consideramos que acepta su uso.