We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Multi day program - On which day are we logging in?

Development and Programming

Sintra's avatar
Sintra
57 posts
18 years ago
Sintra's avatar Sintra

Hi, I am hoping that someone can give me some pointers on how to tackle the following. I want to offer a multiday program where people login in every day and depending on which day they are of the x-day program they get served different content.

How do I check upon member login on which day of the x-day program they are and how do I then trigger a specific template? Any suggestions?

       
Sintra's avatar
Sintra
57 posts
18 years ago
Sintra's avatar Sintra

Well, got it working. Was easier than I thought. Don’t know yet how full proof this solution is though.

Approach I used is to write a plugin that compares from the exp_member table the current time to the join_date. It then calculates the difference in number of days and passes that value back to the template.

The template uses an embed tag with the first part of the subtemplates name. It completes the full themplate name by calling the plugin tag which will render the number and therefore the correct template name for the corresponding day of the program.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.