Solution to section/category/page dilema
Long time ago CMS part of In-Portal existed in a dedicated In-Edit module, which allowed to create pages in categories.
Then we merged that module into In-Portal's core and allowed for categories to have a content without a need to create a dedicated sub-page in each category. This in turn raised a naming problem because category can't be a page and we've renamed categories to sections in UI, but still have category term in PHP code.
Obviously Confluence had this problem too, but they solved it by renaming sections to pages. Here is the solution:
- page can have content (e.g. text, images, etc.)
- page can have another pages nested under it - sub-pages
- pages can have items placed on/within them (e.g. products, links)
This way administrator would actually place products on specific pages, where each of them have dedicated url and through this he will categorize them.
Dividing pages from pages
Now we can have pages, that have content and have pages, that don't have content, but display content from other pages. Here is the example:
- There are 2 templates, that can be used to display link details:
- simple link detail page (template:
/in-link/links/detail_simple.tpl
; url:/in-link/links/detail-simple.html
) - enhanced link detail page (template:
/in-link/links/detail_enhanced.tpl
; url:/in-link/links/detail-enhanced.html
)
- simple link detail page (template:
- There is a category/section/page where this link is listed (e.g. primary section/category):
- url:
/directory/sample-sub-folder/another-folder.html
- url:
- There is name/filename corresponding to that link on that page, used to uniquely identify it:
- url:
/link-filename.html
- url:
Final url would consist of all components described above:
- /<path_to_content_page>/<path_to_template_for_displaying_content>/<path_to_item_within_a_page>.html
- /<directory/sample-sub-folder/another-folder>/<in-link/links/detail-simple>/link-filename.html
- /<directory/sample-sub-folder/another-folder>/<in-link/links/detail-enhanced>/link-filename.html
"<" and ">" are added just for visibility and aren't actually present in the url.
In all these urls we have 2 pages:
- page that has content
- storage: ID in
m_cat_id
(main category id) variable - usage:
<inp2:c_Field name="Name"/>
- would display name of content page - usage (proposed):
<inp2:page.content_Field name="Name"/>
- would display name of content page
- storage: ID in
- page that displays content
- storage: template name in
t
(template) variable - usage:
<inp2:st_Field name="Name"/>
- would display name of display page - usage (proposed):
<inp2:page_Field name="Name"/>
- would display name of display page
- storage: template name in
Of course if no page to display content is given we're considering, that page, that has content is capable of displaying it on it's own and both pages would refer to same place. I don't think, that storage way changing is good idea, so we keep it as is for now.