Customizing downloads & searching
Login / Search
#102418 (In Topic #20070)
Fan in training
While trying to figure out what is what using the features like the Template Tree it appears I may not be able to figure it out without a little pointer (looks like 500 'templates' in this list 0_o). I am basically trying to figure out how to display any custom fields I have for a download in other places like the download category box that shows only the author, downloads, date, rating & a truncated description. If I could somehow get my custom fields to show up here as well, that would be fantastic.
I also have another semi-related question. Those 'custom fields', they appear to be set up as Catalogues (go to downloads content, then choose "Choose custom 'Downloads' fields") and they are supposedly searchable (I selected the option to be allowed searched) but I can't seem to figure out how to search using the custom fields I have setup. Like for instance a multi-choice custom field for a download, say software types that belong to various OS's. I would like to be able to search for all Windows programs or Linux only. When the download is displayed, I would like it to show something like this
Something like that. So, anyway to put the 'Windows: Check' on the download category screen (just above the last screen of the download where the download's image gallery is, and where you can rate the file, etc.) and be able to search by those particular fields (like even under the advanced options for the search of downloads, I couldnt find a way)? I obviously understand I need to code in the code for the custom fields, but its that code that I can't seem to find.
Thank you in advanced. Highly appreciate any help
Only when you try and customise complex stuff in it . I've talked about this recently, ocPortal should not be considered a substitute for having a programmer on complex custom projects.
If there's 500 in the templates tree, my guess is you have a lot of blocks in active use. I'd advise against that, mainly for performance and user experience (clutter).
In DOWNLOAD_SCREEN.tpl these lines do it:
I imagine they would transfer over to DOWNLOAD_BOX.tpl fairly easily.
This setting is just a carry over from catalogues. Sorry, you can't extend the search system yet. Here's the tracker issue:
0000393: Custom fields on search - ocPortal feature tracker
It would be a particularly complex/challenging thing to implement, because the data is not in the same place as the actual primary content.
If you want to have a huge library of downloads, with searching on custom fields, this is not going to be close to straight forward – I would definitely worry about performance, and load testing it. Also, a multi-choice custom field is not stored in a search-friendly format itself, it's only parsed out for rendering, not indexable in the database – you'd need to make separate checkbox fields, and make them look nice via some fancy custom coding.
You can set up custom category filter UIs in v10, when that is released – but I can't promise this will be easy. You have to code up filter strings, get it into the display template, and tie it to a filter form.
There are too many online users to list.