Recently, we’d added a small feature- the routing details for any menu item would display on the main list screen. It would make it easier for a site admin to see exactly where their link goes- a system page, uploaded document, other feature, external website, etc. Worked great, except for the document categories.
An admin can link to an individual uploaded file, or to a list of files grouped into a specific category. The category functionality was shoehorned into the system after initial creation and it was kind of confusing. Most features used numbers as id- but document categories was a sub-number of two different feature numbers (5 for PDF, 19 for Pictures- both of which use the same category system, denoted by id #99).
I was just as confused typing that last paragraph as when I first checked the source. In the end, I used 5 different msql queries to the database- each one responsible for getting a different type of link info (page, external link, feature, document feature, document category feature). It works just fine, but I’m betting there was a better/cleaner way to do it. None of the queries are super long or complicated, and it was easier for me to create multiple small queries than try to combine them into one, though it seems logical that I’m sacrificing some performance speed.
Of course, it takes ckeditor quite a while to load anyway, so probably no one will notice that I’m tying up all the lines with sql queries. Hopefully…