Calendar List layout - Extra <P> tag appearing [SOLVED]

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
Charmie
Forum Members
Forum Members
Posts: 80
Joined: Tue Mar 03, 2009 3:32 pm

Calendar List layout - Extra <P> tag appearing [SOLVED]

Post by Charmie »

Hi All,

I am loving this CMS it is so simple and yet does everything I need.

I am hoping there is someoneout there that can help me with this problem.
I have a three column layout of my web site using side-by-side tags.
Left is for the left-hand navigation, the middle for the page content and the right for any news items.

The problem I am having is that the calendar module display funny when I list the upcoming events. But when I click the more option to see the full event list, it displays correctly.
I have looked in te template and tried modifying it, but can not understand why an extra tag is being added, which seems to throw off my entire design.

Below are snapshots of what my page looks like, also the template and the HTML that makes up the two pages.

The Calendar list template:

Code: Select all

<div class="calendar-list">
<span class="calendar-prev"><a href="{$navigation.prev}">{$lang.prev}</a></span>     <span class="calendar-next"><a href="{$navigation.next}">{$lang.next}</a></span>

<h1>{if $day > 0}{$day} {/if}{$month_names[$month]} {$year}</h1>
{foreach from=$events key=key item=event}
	<div class="calendar-event">
	<h2>{$event.event_title}</h2>

	{assign var=month_number value=$event.event_date_start|date_format:"%m"}
	{assign var=end_month_number value=$event.event_date_end|date_format:"%m"}
	{if $event.event_date_start == $event.event_date_end || $event.event_date_end == 0}
	<div class="calendar-date-from"><span class="calendar-date-title">{$lang.date}: </span>{$event.event_date_start|date_format:"%e"} {$month_names[$month_number]} {$event.event_date_start|date_format:"%Y"}</div>
	{else}
	{if $event.event_date_start|date_format:"%d%m%Y" == $event.event_date_end|date_format:"%d%m%Y"}
	<div class="calendar-date-from"><span class="calendar-date-title">{$lang.date}: </span>{$event.event_date_start|date_format:"%e"} {$month_names[$month_number]} {$event.event_date_start|date_format:"%Y %H:%M"} {$lang.to} {$event.event_date_end|date_format:"%H:%M"}</div>
	{else}
	<div class="calendar-date-from"><span class="calendar-date-title">{$lang.date}: </span>{$event.event_date_start|date_format:"%e"} {$month_names[$month_number]} {$event.event_date_start|date_format:"%Y %H:%M"} {$lang.to} {$event.event_date_end|date_format:"%d"} {$month_names[$end_month_number]} {$event.event_date_end|date_format:"%Y %H:%M"}</div>
	{/if}
	{/if}
	{if $event.event_summary !="" && ($detail != 1 || ($event.event_details =="" ||  $event.event_details == "<br />"))}
		<div class="calendar-summary"><span class="calendar-summary-title">{$lang.summary}: </span>{$event.event_summary}</div>
	{/if}
	{* optionally display detail information 
		{if $event.event_details !="" && $event.event_details != "<br />"}
		<div class="calendar-details"><span class="calendar-details-title">{$lang.details}: </span>{$event.event_details}</div>
		{/if}
	*}
	<a href="{$event.url}">{$mod->Lang('cal_more')}</a>

	</div>
{/foreach}

{if $return_url != ""}
<div class="calendar-returnlink">{$return_url}</div>
</div>
{/if}

Source code for upcoming event list:

Code: Select all

<div id="content">

			<p class="Underline">Upcoming birthdays</p>
			<p class="text"><p><div class="calendar-list">
<span class="calendar-prev"><a href="http://www.christchurchnorthfinchley.co.uk/index.php?mact=CGCalendar,m4,default,1&m4display=list&m4use_session=&m4year=2009&m4month=3&m4returnid=73&page=73">« Prev</a></span>     <span class="calendar-next"><a href="http://www.christchurchnorthfinchley.co.uk/index.php?mact=CGCalendar,m4,default,1&m4display=list&m4use_session=&m4year=2009&m4month=5&m4returnid=73&page=73">Next »</a></span>

<h1>April 2009</h1>
	<div class="calendar-event">
	<h2>Leyla Henderson Jaye's birthday</h2>

				<div class="calendar-date-from"><span class="calendar-date-title">Date: </span>22 April 2009</div>
				<div class="calendar-summary"><span class="calendar-summary-title">Summary: </span>Leyla Henderson Jaye's birthday</div>
			<a href="http://www.christchurchnorthfinchley.co.uk/index.php?mact=CGCalendar,cntnt01,default,0&cntnt01event_id=50&cntnt01display=event&cntnt01returnid=73">more >></a>

	</div>

</p></p>

Source code for full event item:

Code: Select all

<div id="content">

			<p class="Underline">Upcoming birthdays</p>
			<p class="text"><div class="calendar-event">
<h1>Leyla Henderson Jaye's birthday</h1>

  <div class="calendar-date-from"><span class="calendar-date-title">Date: </span>Apr 22, 2009 12:30:00 AM</div>
	<div class="calendar-details"><span class="calendar-details-title">Details: </span>Leyla Henderson Jaye's birthday</div>

<div class="calendar-fields">
  </div>
<div class="calendar-returnlink"><a href="http://www.christchurchnorthfinchley.co.uk/Private_gateway_birthdays.html">Return</a></div>
</div></p>
		</div>
I have attached two images of what happens to my page.
In the first image the right hand news box has moved over tot he centre of the page, in the second image it is in the correct position.
The only difference in the source code is and extra tag that appears around te content.....not sure why this is happening?

Really hope someone can help with this.
Charmie
Attachments
Snapshot 2009-04-29 22-05-17.jpg
Snapshot 2009-04-29 22-04-19.jpg
Last edited by Charmie on Fri May 01, 2009 1:39 pm, edited 1 time in total.
Charmie
Forum Members
Forum Members
Posts: 80
Joined: Tue Mar 03, 2009 3:32 pm

Re: Calendar List layout - Extra <P> tag appearing [SOLVED]

Post by Charmie »

Hi All,

I solved this.
It seems it was not the extra tag that was causing the template to go wonky but an open tag.
Once closed by removing from inside the {IF} statement it worked fine.
Post Reply

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