Proposals/Content Management System
From Mahara Wiki
Here are a few thoughts on adding CMS-like functionality to Mahara. (This is largely based on emails from Penny.)
At the moment you can create site views, sure, but you basically have to hard code navigation into the theme.
We want the ability for administrators to be able to define the menu structure out of both code-level menu items (as they are now), and site views.
Say you have 5 site views, but you want to cover 3 languages. The logical way to do that is to create 15 views, and then manage them with tags.
Eg, 3 views tagged 'siteview:aboutus', also tagged with a language ('lang:en' or 'lang:fr' for example).
Then you arrange the 'siteview:aboutus' tag into the menu. Mahara picks the title of the appropriate view (based on the language) in order to create the menu structure with the appropriate naming scheme.
The UI would need to prevent more than one view from matching both 'siteview:aboutus' and 'lang:en'.
This proposal is also the first time to touch on the idea of "machine tags" (a la flickr), that is, tags that are used for some programatic thing, rather than just metadata. Flickr uses them for example, for integration with last.fm events.
Configurable by the administrator, so we can have something like www.mahara.org/pages/about_mahara going to www.mahara.org/diretory/whatever.php?id=4
This needs to be discussed/specified further because we may want to avoid certain URLs and also we may want to let users have a public URL for one (or many?) of their views. e.g. mahara.org/users/francois
Things to Consider
- Will users be restricted to adding only site views to the navigation? What about other content (views, groups, artefacts) that have "logged-in" or "public" access? Seems useful (we link the Mahara Community group on mahara.org)
- Will existing navigation items be changeable?
- If yes:
- Entire navigation structure moved to database (including things added by plugins - messy)
- What happens to multi language support for the link titles? Store an entry per link per language?
- If no:
- Simpler - menu is extended by database elements much like it is currently extended by plugin elements
- Less flexibility, but not necessarily an issue - are there any good reasons for actually changing the Mahara navigation (as opposed to the language strings for the link titles)?
- If yes:
- How do selected internal links appear in the navigation? For example, if a custom navigation element links to a Mahara group, we would want the custom link to be the selected item, rather than the "Groups" link.
- Compare $_SERVER['REQUEST_URI'] with the URLs of custom navigation items, and override the selected item if there is a match - feels like a complete hack
- Give custom elements a degree of awareness about what they link to. Rather than just storing the URL, we can also have an 'itemtype' column that can take on different values ('view', 'group', 'artefact', 'externalurl') For anything that isn't 'externalurl', store an id instead of a url.
- Will sub-items be allowed? This introduces a whole new set of questions and required logic. For example, sub-items don't make sense for parent items that link to external pages.
- What does this feature add to Mahara that can't be done with the Links and Resources Menu, or could be done by extending the Links and Resources Menu?