calendar onmouseover

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
danel
Forum Members
Forum Members
Posts: 12
Joined: Mon Jul 07, 2008 8:06 pm

calendar onmouseover

Post by danel »

is it possible to use in calendar module onmouseover function ?

for example, if you move cursor on the date, it displays event without clicking. calendar is @ www.noored.hiiumaa.ee
rhysdavies
Forum Members
Forum Members
Posts: 31
Joined: Thu Oct 04, 2007 9:23 am

Re: calendar onmouseover

Post by rhysdavies »

I wanted to do this, and at first it looked a simple case of adding an alt tag to the link in the template code as follows:

Code: Select all

{if isset($day.events.0)}<a [color=yellow]title="{$event.event_title}" [/color] href="{$day.url}">{$key}</a>
The bit I have added is in yellow, and basically I thought that this would display the event title when hovering over a date.  Unfortunately I cannot get it work, however, I am on the right lines, as I tried just a bit of plain text as a title:

Code: Select all

{if isset($day.events.0)}<a [color=yellow]title="PUT EVENT TITLE HERE!!" [/color] href="{$day.url}">{$key}</a>
This works without any trouble, but I am now stuck as to what the next step.  I will keep beavering away at it!
rhysdavies
Forum Members
Forum Members
Posts: 31
Joined: Thu Oct 04, 2007 9:23 am

Re: [SOLVED] calendar onmouseover [SOLVED]

Post by rhysdavies »

I found what the problem was - I deleted a lot of things from the template, in particular this bit of code

Code: Select all

{foreach from=$day.events item=event}
{/foreach}
So obviously, it was not going to find the event title.

So revised code goes like this:

Code: Select all

{if isset($day.events.0)}<a title="{foreach from=$day.events item=event}{$event.event_title}{/foreach}" href="{$day.url}">{$key}</a>
Hope this helps!
Post Reply

Return to “Layout and Design (CSS & HTML)”