By mhutch on
Is there any way to make menus based on the arguments of a view?
Let me explain. I have a views.module view that I use to sort through posts by date, i.e. journal/yyyy/mm/dd/post_title, and I'd like to have a block at the side that can be used to navigate through the various dates, like the following diagram:
2007 (14)
-- May (2)
-- -- Weds 2 (1)
-- -- Fri 18 (1) <---selected page is /journal/2007/05/18
-- April (6)
-- February (5)
-- January (1)
2006 (31)
2005 (27)
The thing is, at each level this is *extremely* similar to the "summary" that views can creat, so I was hoping there' is an easy way to use views to do this without resorting to my own PHP and SQL custom block.
Comments
I've tried to do some
I've tried to do some similar things. The best I could come up with was to determine what the arguments of the view are (you can do this by loading the view), and then figuring out non-views-native ways of culling a list of argument values. For example, if I were using the Taxonomy: Term ID (taxid) argument, I could then get the taxonomy tree using API functions in the taxonomy module and use that to build a menu.
I threw something together in PHP
If anyone is interested: