I’m having difficulty getting a template with the {exp:weblog:calendar} tag to filter itself based on a category ID passed in the URL. For example:
I have a template set up to show all entries contained in the calendar weblog in a calendar. When I pass a it a category that I want it to limit the displayed data to, it still shows all the entries.
OK- I THINK I understand what you want and why it isn’t working. You want the calendar day links to be handled dynamically- like the entries retrieved by the weblog tag are by default. However, the calendar isn’t set up to be dynamic in quite that same way (which makes sense under typical use).
What you could try is snagging the category segment out of the url and using php to echo it out as a parameter. Or hack it- it doesn’t look hard (give a yell if you want me to poke at it). And either way, you might want to put in a feature request for the ability to do this- I can see how it would be handy to have the option.
I thought of the URL segment thing. But that would only grab the “C8” (if that was the category I wanted) and not just the “8” part, correct? How can I grab the 8 out of the URL so I can echo it in the tag?
You’ll have to be a little careful- because this will screw up if you don’t have anything in segment 3. You could add in some more checks- maybe define the whole parameter- stuff like that- if you are worried about hitting the template without the url structure you’re expecting. But basically- that’s the idea.
That might work, provided I could figure out how to deal with the calendar being of a different—auxillary—weblog titled “XXXXXX”.
This solution shows ALL categories from BOTH weblogs, the default (weblog1) and the auxillary, designed to manage and keep separate the calendar-oriented one.
P.S. This is code that goes into the CALENDER template of the COMENCAL template group for the auxillary weblog COMENCAL1. The other template, the one to display the details of events is the INDEX template of the COMENCAL template group. The INDEX template is pretty much like the primary weblog’s INDEX template.
I’ve built a small calendar for the INDEX page of my Big Calendar activity in an attempt to indicate dates of other event items on the Big Calendar while people are perusing the details in the Index template view.
The problem is that this small calendar is showing not only the items set into the Calendar weblog, but ALSO showing the items set into the INDEX of the main weblog.
How do I filter the latter out so that only the Calendar weblog related items will be considered an “entry” in the small calendar on the Big Calendar weblog’s Index?
a different way
what this PHP does is allows you to dynamically keep your Categories and the Date listing functions provided by both the Calender and weblog tags.