Skip to content

Refactor datatype festival #133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
giplt opened this issue Nov 26, 2018 · 2 comments
Open

Refactor datatype festival #133

giplt opened this issue Nov 26, 2018 · 2 comments
Labels
Pagetype: Festival Value: Coders Enhancement of codebase, API, documentation

Comments

@giplt
Copy link
Contributor

giplt commented Nov 26, 2018

The datatype festival could be a lot easier once the datatype event (#131) is implemented.

@giplt giplt added the Value: Coders Enhancement of codebase, API, documentation label Nov 26, 2018
@matthijskooijman
Copy link
Contributor

Such an "event" page type, when used as part of a festival, should probably not get its own url in the root namespace (like normal pages), but instead only exist "inside" the festival page (where the festival page is responsible for routing requests to the event and/or processes requests itself). This still allows getting a list of all "event" pages if you query recursively.

    <page id="5cf806dfd2661" type="festivalpage">                              
      <language id="en" name="festival2019"/>                                  
      <page id="5cf806dfd2661" type="event"/>                                  
    </page>

Then the festival page XML will refer to the event page id for each contribution.

Having separate page XML for contribution events would probably simplify translation and versioning for events as well (#335).

To allow customizing display or derive attributes for certain kinds of events, a "subtype" approach might be useful, where there is e.g. a festival_contribution_event or agenda_event which is a subclass of event and can override some methods (and maybe also add subtype-specific methods and fields). Such a subtype could just be the type="..." value in the hypha.xml, but that would somewhat complicate querying "give me all events" (though with some reflection, getting a list of all datatypes that extend the event base type is certainly possible). Maybe adding a subtype (or something implements="event") could make querying easier (but that does essentially duplicate the PHP class inheritance info in the XML).

Open question: Where to store the extra data? E.g. "Notes for the organizers" is not an event property, but only exists for festival contributions. Do we store that in the festival XML, along with the reference to the event page id? Or inside the event page XML as an "extra" attribute/tag (i.e. not interpreted by code that looks at any event, but interpreted by the festival module)? Storing it inside the event XML could help to include the property in the translation / versioning structure (though for this particular "notes for the organizers", this would not need to be translated, maybe only versioned).

@giplt
Copy link
Contributor Author

giplt commented Aug 24, 2020

I would put the extra field(s) in the festival XML as they apply specifically to the context of the festival and need no translation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pagetype: Festival Value: Coders Enhancement of codebase, API, documentation
Projects
None yet
Development

No branches or pull requests

2 participants