Hi guys,
I am currently doing something for a local restaurant and would like to achieve this one thing:
The proprietor would like to provide his website visitors with a lunch menu for he week (which is published every Sunday evening) and also for the current day. Ideally, the visitor should be presented the current day menu AND links to "next day" and "the whole" week. Is this achIevable woth the (pretty amazing) Couch, please?
My suspition is that I need to use 7 pages cloned weekly from a single template (basically a simple a table), each with a date (or day) field...
...and then use the "custom_field" parameter and/or "k_day" and/or "k_date"...
...to either display the entire week OR to compare the day in the page with current day to display the "today`s menu page".
Also, if I want to show all 7 pages cloned from that template in a single page (for a weekly menu), it is basically the same logic as in the Aurelius blog example, correct?
Does that make sense, please - or can you kindly give me a hint?
Thanks a lot in advance!
Majkl
Edit:
Could it be something like this?
listing the entire week:
...which contains
...while the daily-lunch-menu.php is the actual template containing basically a single 2x7 table
link to display the "today"
...or do I need to create a separate snipet for the "today" view too?
I am currently doing something for a local restaurant and would like to achieve this one thing:
The proprietor would like to provide his website visitors with a lunch menu for he week (which is published every Sunday evening) and also for the current day. Ideally, the visitor should be presented the current day menu AND links to "next day" and "the whole" week. Is this achIevable woth the (pretty amazing) Couch, please?
My suspition is that I need to use 7 pages cloned weekly from a single template (basically a simple a table), each with a date (or day) field...
...and then use the "custom_field" parameter and/or "k_day" and/or "k_date"...
...to either display the entire week OR to compare the day in the page with current day to display the "today`s menu page".
Also, if I want to show all 7 pages cloned from that template in a single page (for a weekly menu), it is basically the same logic as in the Aurelius blog example, correct?
Does that make sense, please - or can you kindly give me a hint?
Thanks a lot in advance!
Majkl
Edit:
Could it be something like this?
listing the entire week:
- Code: Select all
<cms:embed 'seznam_novinek.php' />
...which contains
- Code: Select all
<cms:pages masterpage='daily-lunch-menu.php'>
<div>
<h2><cms:show k_page_title />, <cms:date k_page_date format='d. m. Y'/></h2>
<cms:show text1 />
</div>
</cms:pages>
...while the daily-lunch-menu.php is the actual template containing basically a single 2x7 table
link to display the "today"
- Code: Select all
<cms:set today="<cms:date format='Y-m-d' />" />
<cms:pages masterpage='daily-lunch-menu.php' orderyby='end_date' order='asc'>
<cms:if today = day-date > <!-- the day-date being a field input in proper format as custom_field in the cloned page -->
<a href="<cms:show k_page_link />">click to see today`s menu</a>
<cms:else />
<p> We don't cook today</p>
<p>Check out the <a href="weekly-menu.php">weekly menu</a>.</p> <!-- a page with embedded snipet containing all cloned pages of <cms:pages masterpage='daily-lunch-menu.php' orderyby='end_date' order='asc'> -->
</cms:if>
...or do I need to create a separate snipet for the "today" view too?