Problems, need help? Have a tip or advice? Post it here.
2 posts Page 1 of 1
Hello all,

I was wondering if it was at all possible to have two days be listed on the small calendar when clicking on the day itself whether it is with archives or repeatable , me and a friend are currently trying to figure out a workaround but we are not currently very successful.


Any input would be greatly appreciated, and if possible as soon as you can. Please and thank you!
Hi,

If you compare the code of the small and large calendars (given in the sample implementation at http://docs.couchcms.com/concepts/events-calendar.html)
Small calendar:
Code: Select all
<cms:if k_position='current_month' >
    <cms:if k_count_entries >
        <td class='entries <cms:show tdclass />' >
            <a href="<cms:link masterpage='events.php' year=k_year month=k_month day=k_day />"><cms:show k_day /></a>
        </td>
    <cms:else />
        <td class='<cms:show tdclass />' ><cms:show k_day /></td>
    </cms:if>
<cms:else />
    <td class='other_month'><cms:show k_day /></td>
</cms:if> 

Large calendar:
Code: Select all
<cms:if k_position='current_month' >
    <cms:if k_count_entries >
        <td class='entries <cms:show tdclass />' align='center'>
            <a href="#"><cms:show k_day /></a>
            <ul>
                <cms:entries limit='2' skip_custom_fields='1'>
                <li>
                    <a href="<cms:show k_page_link />"><cms:show k_page_title /></a>
                </li>
                </cms:entries>
            </ul>
        </td>
    <cms:else />
        <td class='<cms:show tdclass />' ><cms:show k_day /></td>
    </cms:if>
<cms:else />
    <td class='other_month'><cms:show k_day /></td>
</cms:if>

You'll find that the two differ only in the use of <cms:entries limit='2' skip_custom_fields='1'> with the larger version.

So, theoretically, you can place the same tag in the smaller version and get the listing there.
However, there simply is not sufficient space in the small calendar to actually show the pages in the squares.

So, one way of doing this could be to put the output of the <cms:entries> tag in a hidden div and then when the date is clicked show that div as a pop-up.
There could be other ways too.

Eventually what HTML / JS/ CSS you choose to use is entirely your discretion - all such code (including the calendar) you'll find in our documentation are only *samples*. Couch is concerned only with fetching the data. It is actually expected that you use your own markup coupled with Couch tags to create whatever kind of output you need.

Hope it helps.
2 posts Page 1 of 1
cron