Modal with content depending on opening hours I need the user to enter opening hours for their helpline in the CMS along with two sets of text, one that will be displayed if the user views it during their opening hours &amp; another which is displayed outside of their opening hours.

This content needs to be displayed in a modal on specified pages when a link is clicked (a 'modal box' is like a JavaScript overlay on the page).

The way I have been trying to approach the problem (taken from a suggestion else where on Stack Exchange) was to use the Office Hours &amp; Colorbox Node modules together. Unfortunately unless I've misunderstood what Colorbox Node does or how it works I cannot get it to open a modal at all, I can't actually get it to do anything.

Below are the steps I've taken to install the Office Hours &amp; the Colorbox Node modules so hopefully someone can spot what I've done wrong. I am more than open to other suggestions to solve this problem though.

Using the two modules mentioned my plan was to create a custom template which would read the current date &amp; time, compare it to what has been entered into the Office Hours module then display the appropriate text from one of two text area fields in the CMS.


Created fresh Drupal 7 install
Installed Office Hours 7.x-1.4 module (https://www.drupal.org/project/office_hours)

2a. Installed required module Date api 7.x-2.9 (https://www.drupal.org/project/date)
Installed Colorbox node 7.x-3.5 module (https://www.drupal.org/project/colorbox_node)

3a. Installed required module colorbox 7.x-2.10 (https://www.drupal.org/project/colorbox)

3b. Installed required module Libaries 7.x-2.2 (https://www.drupal.org/project/libraries)
Created new content type with the Office Hours field
Created new node setting the new office hours
Created test page with link to office hours page, link has class of "colorbox-node" which should show a modal?


This is what the link tag currently looks like:

&lt;a class="colorbox-node" href="/node/1?width=600&amp;amp;height=600"&gt;Test link&lt;/a&gt;
if you run your site under an url like example.com/dat/fresh/site/, remove the first slash in the href, like:

&lt;a class="colorbox-node" href="node/1?width=600&amp;amp;height=600"&gt;Test link&lt;/a&gt;


or change to full path, like:

&lt;a class="colorbox-node" href="/dat/fresh/site/node/1?width=600&amp;amp;height=600"&gt;Test link&lt;/a&gt;