Hi,
I am new to CouchCMS but it is working great and generally makes sense.
I am trying to add this CMS to our football clubs website (whilst revamping) and have hit a small roadblock.
Basically I'm wanting to display our current fixtures in groups by month (both previous and future). Hopefully there will be a screenshot of the static site attached.

I have created 2 file one called new-fixture which has the fixture date, teams, competition etc.. and another file called fixtures which loops through the cloned page outputting the content. The is fine except for the previously mention grouping by month.
How would I go about trying to achieve this? Is it done on output or do I need to modify the new-fixture template?
NOTE: Creation date is no good as fixtures are listed long before they are played.
Code below for the new-fixture and fixtures files
Fixtures 'loop'
Any help/advice greatly appreciated.
I am new to CouchCMS but it is working great and generally makes sense.
I am trying to add this CMS to our football clubs website (whilst revamping) and have hit a small roadblock.
Basically I'm wanting to display our current fixtures in groups by month (both previous and future). Hopefully there will be a screenshot of the static site attached.

I have created 2 file one called new-fixture which has the fixture date, teams, competition etc.. and another file called fixtures which loops through the cloned page outputting the content. The is fine except for the previously mention grouping by month.
How would I go about trying to achieve this? Is it done on output or do I need to modify the new-fixture template?
NOTE: Creation date is no good as fixtures are listed long before they are played.
Code below for the new-fixture and fixtures files
- Code: Select all
<?php require_once("./admin/cms.php"); ?>
<cms:template title="New Fixture" clonable="1" order="asc">
<cms:editable name="fixture_date" type="datetime" label="Date of Fixture" />
<cms:editable name="fixture_type"
label="Fixture Competition"
description="Select one from these"
opt_values="Highland League | Highland League Cup | Menzies Distribution North of Scotland Cup |
Scottish Cup | Friendly"
type="dropdown" />
<cms:editable name="home_team"
label="Home Team"
description="Select one from these"
opt_values="Nairn County | Brora Rangers | Buckie Thistle | Clachnacuddin | Cove Rangers |
Deveronvale | Formartine United | Forres Mechanics | Fort William | Fraserburgh |
Huntly | Inverurie Locos | Keith | Lossiemouth | Rothes | Strathspey Thistle |
Turriff United | Wick Academy"
type="dropdown" />
<cms:editable name="away_team"
label="Away Team"
description="Select one from these"
opt_values="Nairn County | Brora Rangers | Buckie Thistle | Clachnacuddin | Cove Rangers |
Deveronvale | Formartine United | Forres Mechanics | Fort William | Fraserburgh |
Huntly | Inverurie Locos | Keith | Lossiemouth | Rothes | Strathspey Thistle |
Turriff United | Wick Academy"
type="dropdown" />
<cms:editable name="match_sponsor" type="text" label="Match Sponsor" />
<cms:editable name="ball_sponsor" type="text" label="Ball Sponsor" />
<cms:editable name="kickoff" type="text" label="Kickoff Time" />
</cms:template>
<!doctype html>
<html lang="en">
</html>
<?php COUCH::invoke(); ?>
Fixtures 'loop'
- Code: Select all
<div class="fixture-list">
<cms:pages masterpage="new-fixture.php" order="asc">
<!--Group fixtures by month.-->
<div class="month"><h4><cms:date fixture_date format="F" /></h4></div>
<ul>
<li>
<!--Display the date of the fixture-->
<div class="cell"><span><cms:date fixture_date format="jS F" /></span></div>
<!--Display the Home Team, Away Team and result (if any)-->
<div class="cell">
<span><cms:show home_team /></span>
<span class="score"></span>
<span><cms:show away_team /></span>
</div>
<!--Display the competition the fixture is for-->
<div class="cell"><span><cms:show fixture_type /></span></div>
</li>
</ul>
</cms:pages>
</div>
Any help/advice greatly appreciated.