Created
July 19, 2012 20:26
-
-
Save fxdgear/3146540 to your computer and use it in GitHub Desktop.
Template Choices
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Something along these lines: | |
class SiteTemplate | |
name - Business user "friendly" name | |
path - The path to the actual template | |
type - ('style', 'boutique') | |
class SiteTemplateContext | |
""" | |
We use this to restrict template availability to only | |
the contexts we want. | |
""" | |
template - SiteTemplate | |
context - SiteContext | |
On SiteContext, we add: | |
default_boutique_template - SiteTemplate | |
default_style_template - SiteTemplate | |
This lets us define the defaults at the SiteContext level, so conceivably the defaults for Toys R Us and Rue proper can be different. | |
On BoutiqueContext, we can add: | |
boutique_template - SiteTemplate: this can be blank, in which case we use the default_boutique_template from SiteContext. | |
default_style_template - SiteTemplate: this can also be blank, and we fall back to default_style_template from SiteContext. | |
StyleContext: | |
style_template - SiteTemplate: nullable, falls back to above |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment