3070 Posts in 869 Topics by 651 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 920 Views |
-
Event_calendar and "show in menu"

3 July 2010 at 8:34am Last edited: 3 July 2010 8:35am
Hi,
I'm trying to have my calendar show in top menu but not the calendar_events in the tree below it.
by unchecking "show in menu".
But this also stops the events from showing at all in the events list.Is there an easy way to fix this?
Am digging round the event_calender code and getting into dataobject::get filters etc
but surely this is a simple thing to do - why does unchecking "show in menu" also hide the events in my event list?
and anyone got a fix?thanks
Martin -
Re: Event_calendar and "show in menu"

4 July 2010 at 9:54am Last edited: 4 July 2010 9:56am
well - have a workaround by altering a core file in event_calendar
changed line 159 of calendar.php from
if($children = $this->Children()) {
to
if($children = $this->AllChildren()) {and now I get all events showing in my calendar even when "show in menu" is off.
but would love a better solution .................
cheers
Martin -
Re: Event_calendar and "show in menu"

2 December 2010 at 7:10am
I just came across this problem as well. And while I don't think this is an elegant solution, I think it's better than hacking the core event_calendar code.
In my template.ss file I use:
<% if CalendarEvent %>
...do nothing...
<% else %>
<% control Children %>
...some code...
<% end_control %>
<% end_if %>IMHO - I think of this as a template hack to fix a code logic issue. But at least it keeps the code from being hacked. It doesn't seem logical that events would be forced to show in the navigation. Like the blog module, the events should show up in the events holder without cluttering up the navigation.
Chris.b
| 920 Views | ||
|
Page:
1
|
Go to Top |


