Hi, I would like to create a dynamic sidebar for a real estate website. In this moment the sidebar items are hard-coded with a lot of ul, li. I wan't that the client to be free and to let him add any links with filters in the future.
What I want to do is to put all this items in a table, with a parent column (to make it recursive). But how can I get the URL and the count?
For example the URL for sale 4 rooms apartments is something like this:
First of all get count of all items from server and based on category list them out into ul li and apply filter on it .
And as Osman said put the live url links so we can test it.
I know about link of course, sorry for confuse you, it was only for example. I will modify into example.com . I don't have a live preview of the website as is on development on localhost. What I think until now is to have this table:
filters (a JSON with the filters? like: {'transaction':'sale', 'type':'apartment', 'city':'washington', 'rooms': '4'} and based on this to build the URL and count? )
Also to count on 20 - 30 list items can be problematic from the performance side. I should store the count for each filter somewhere I think or I run out of idea.
@jkarthikeyan I don't think is a good idea because the filters depends on 6 - 7 tables (is a real estate database, with cities, streets, areas and a lot of other joins).