Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-03-24 22:44:13

photonomad
Member
Registered: 2005-09-10
Posts: 290
Website

In need of suggestions on how to do this schedule with TXP...

For the past few days I have been trying to figure out how to do something with Textpattern and I thought I’d open it up for input/suggestions:

I would like to create a schedule similar to the one on this site.

Each instructor will have an article in textpattern with a bio (in the Instructor section of the site)

Each class will have an article in textpattern with a description (in the Classes section of the site)

Some instructors will teach more than one class on the same or multiple days, some classes will be taught by more than one instructor on the same day and/or on more than one day. Obviously, there are 7 days. I was trying to think if there was a way to use custom fields and categories in the instructor articles or the class articles or …. maybe create an article for each day of the week… then there is the issue of the start and end times and how to make them sort in chronological order for each day…. and… I’d like to include one more column in the schedule for notes… just a little bit of optional text about a class if needed.

I love Textpattern and I would love to figure this thing out with TXP without requiring weird textile and manipulation in articles or custom fields on the client’s part. I’m pretty confident about using smd_if and variables and lots of plugins on the back end. Maybe the solution is obvious and I am just missing it? Suggestions are welcome and/or a proposal to work some custom coding magic! Thanks.

update: as mentioned in this forum post, sed_pcf might sort of get me close — but I’d prefer that the client wouldn’t have to type out the name=value pairs in the custom field. Even then, the class times would still need to be sorted in chronological order… not sure how to swing that without a real valid timestamps… hmm.

Last edited by photonomad (2011-03-25 02:31:23)

Offline

#2 2011-03-25 00:28:56

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,473

Re: In need of suggestions on how to do this schedule with TXP...

Hi Stacey

I would like to create a schedule similar to the one on this site.

The page http://bit.ly/hnMrv6 is empty …

Last edited by GugUser (2011-03-25 00:31:06)

Offline

#3 2011-03-25 02:31:10

photonomad
Member
Registered: 2005-09-10
Posts: 290
Website

Re: In need of suggestions on how to do this schedule with TXP...

hmm… that’s strange — try this: http://yogawebdesign.com/schedule/

Offline

#4 2011-03-25 05:59:34

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: In need of suggestions on how to do this schedule with TXP...

Sounds like you need another table to store class id, teacher id and time. A whole ‘nother set of articles for this part?


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#5 2011-03-25 11:35:41

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,611
Website

Re: In need of suggestions on how to do this schedule with TXP...

If your schedule changes a lot, another approach might be to try mka_ical. You’ll need an online calendar (google for example) or a calendar server (e.g. here) linked to your calendar on your or your client’s computer, but it works very well and you can control how it is output. I have a client who just adds her dates to a separate calendar in ical and they appear shortly afterwards nicely formatted on her website.


TXP Builders – finely-crafted code, design and txp

Offline

#6 2011-03-25 16:52:47

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,473

Re: In need of suggestions on how to do this schedule with TXP...

Your example in Yoga web design is a static table for 5 days. You need 7 days. But, can the table still stay static?

Offline

#7 2011-03-25 18:52:23

photonomad
Member
Registered: 2005-09-10
Posts: 290
Website

Re: In need of suggestions on how to do this schedule with TXP...

yes – it is going to be static (i.e. – we don’t need a dated calendar, just the names of the days of the week with times for the classes)

Offline

#8 2011-03-25 19:38:18

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,379
Website GitHub Mastodon

Re: In need of suggestions on how to do this schedule with TXP...

What if you did this:

1) Create a section called Schedule

2) Create 7 categories – sunday, monday, etc.

3) Use a custom field for the Teacher name(s) or even the excerpt

4) Use the article title for the class name

5) Use the article body for notes

You can then output the articles with

<txp:article_custom category="sunday" sort="Posted asc" />
<txp:article_custom category="monday" sort="Posted asc" />

Offline

#9 2011-03-25 19:57:58

photonomad
Member
Registered: 2005-09-10
Posts: 290
Website

Re: In need of suggestions on how to do this schedule with TXP...

Thanks Michael! That is a nice way to approach it and I am definitely going to take it into consideration! The only issue I see initially is that the class names will be repeated throughout the schedule, so using the article titles might be problematic. I might want to add the class names as categories too — however, this adds another step in that a category has to be added every time a new instructor or class is added to the site. In addition, I want the instructor name to link to the instructor’s article and I want the class name to link to the article about the class.

The more I think about it…. it sure would be cool if articles could be associated with one another via a pull-down menu on the Write page similar to the category pull down menus. This might be a great feature for glz_custom_fields! A custom field (or fields) could be specified to be a pull-down menu that lists article titles from a specific section (or sections). Then, in the article form, I could call the custom field and it would show up as permlinked title to the corresponding article. hmm…. I know you can just use textile to write a link to other articles in the site, but this would be a neat way to keep it simple for certain applications involving special layouts (like a table/chart/schedule), etc.

Offline

#10 2011-03-29 22:17:48

gerhard
Plugin Author
From: London, UK
Registered: 2005-06-29
Posts: 409
Website

Re: In need of suggestions on how to do this schedule with TXP...

What are your thoughts on this:

1. Each teacher is a section. The first article in that section can be the teacher’s bio. You always offset by 1 when you want just the classes.

2. Each day is a custom field. It contains all the business hours as a set of radios (or checkboxes if it can be held more than once in a day).

3. Each class is an article. It can be taught by a single teacher, in our case reside in a single section. It can be held on different days, at different hours. You do that via custom fields, easy peasy.

Is there anything that I’ve missed?

Offline

Board footer

Powered by FluxBB