I’m working on my second EE site, and it is one for a radio show I do. The basic idea behind the site is to promote upcoming broadcasts, as well as playlists and guest information for past shows. This has been quite challenging in general because I am not a back-end guy, so I am not very fluent with HTML, CSS, JS, etc.
The basic layout for the front page can be found here. I haven’t dropped in the navigation at the top, but you will see that there are 3 boxes below the nav area which have green outlines.
The leftmost box will feature the “Next Show” information, and is an embedded template with the following code in the body:
<div id=“top_box”>
{exp:weblog:entries weblog="ShowBlog" limit="1" sort="asc" show_future_entries="yes" start_on="{current_time format="%Y-%m-%d"} 00:01”}
<div class=“topic_head”>Next broadcast: {Show_Date format="%M %d %Y"}
{Guest_1}</div>
<div class=“body_type”>{current_time format="%Y-%m-%d"}{summary}... (more)</div>
{/exp:weblog:entries}
</div>
And as you can see, on the main page, it pulls up the correct information. In the main body below, there should be multiple listings for future shows, starting the week after the “Next Show” box (I have some entries with made up names/dates). To do this, I have used the suggested php as follows:
<?php
global $LOC;
$current_time = $LOC->decode_date(’%Y-%m-%d %g:%i %A’, $LOC->now + 604800);
?>
<td width=“66%”>
{exp:weblog:entries weblog="ShowBlog" limit="4" sort="asc" show_future_entries="yes" start_on="<?php echo $current_time; ?>"}
{Show_Date format="%M %d, %Y"}
<class=“topic_head”>{Guest_1}</br>
<font size=”-1”>({Guest_1_Affiliation})</font size>
{summary}... (more)
<div id=“sm_spacer”> </div>
{/exp:weblog:entries}
</td>
Now the problem comes when you link to one of the shows shown in the main body. When I click on any of those links, it takes me to the page with the full bio information, but suddenly, the “Next Show” box lists the wrong show (i.e. usually the show whose link was just clicked). Additionally, if one accesses a past show (for example, change the date at the end of the URL to, say, feb_14_2008) and now that “Next Show” box becomes empty.
This makes no sense to me because {current_time} should always read the actual time, and perform the called function based on that should it not? Am I missing something?
—————————- Added Note
If you look in the “Next Show” box, you will also see a date before the summary text, which shows the {current_time} is reading correctly (i.e. it shows the current date). I put that in to make sure the date was being read correctly - but it doesn’t stop the blog entry from being the wrong one.