Core Concepts
Phosis is an opinionated CMS. It’s designed with an eye towards a final goal of a system that provides web developers and webmasters maximum power and flexibility while maintaining blazing speed.
There are some very basic pieces of functionality in the system right now, but it’s under active development, with a very long list of powerful, flexible, and useful planned features!
Decoupling Content From Display¶
Phosis was architected to separate the underlying data of content from how that content is displayed. This allows you to easily reuse data across your site without having to maintain multiple copies of content, like staff pictures or bios, testimonials, etc.
Easy Templating for Any Web Developer¶
Phosis’s templates and containers are regular HTML. However, within that regular old HTML, we wanted a way for frontend developers to be able to mark items that Phosis will be working with. We call these items of interest.
Items that should be of interest to Phosis are flagged with special data-*
attributes. This allows front-end web engineers to build and preview HTML templates using their favorite tools without learning a new templating syntax and all its quirks — all in their chosen environment, without requiring LAMP/MEAN or other local development & preview stacks.
Phosis replaces items of interest with hydrated content from the system based on configuration.
What does ‘Hydrate’ mean?
You’ll read this word a lot when we’re talking about data sources. In computer programming terms, hydrating means taking something — in Phosis’s case, a container or object template — and filling it with data when getting ready to display it.
You may also see us refer to the process of hydration as data binding, which is when each individual part of a template is bound to the underlying data.
These are all tech terms that are jargon-y shorthand for a process. While we generally avoid jargon, we’ve found that “hydrate” is a really good word for what Phosis is doing under the hood.
For example, your designer can mock up an HTML file that has three article previews, and tag the enclosing DOM element and the first article preview as items of interest. When Phosis Render hydrates this template, it’ll strip out the placeholder/demo content and replace it with hydrated DOM objects from the system.
Phosis also simply passes through anything that’s not an item of interest or a container, so you can easily mix static HTML with dynamic data-driven content.
It’s designed to be a frontend-engineer-friendly CMS built for web design systems.
Page Templates, Containers, and Object Templates¶
Phosis has three primary types of items of interest: page templates, containers, and object templates (which include derived objects like forms).
Page Templates¶
Page Templates are the wrappers around your site. Generally, your site will only have one page template containing your menu and footer, logo, etc. However, Phosis does support multiple page templates in a site.
It’s the common wrapper that contains all of the page content on your site.
A single page layout has a placeholder/container for all of a page/article’s rendered content (populated via content blocks or body/HTML) as well as a container for additional content blocks. You can read more about these special page-level containers in the Developer Guide.
Containers¶
Containers are sections of code that can be populated with object/form templates.
For example, your site may have a page that has a container for staff members’ pictures and bios. This could then, in turn, be populated by a “staff member summary” objects template.
Or, a contact page may have a container for the contact form template.
A single container can have multiple blocks that are placeholders for object tempalates.
Object Templates¶
Object templates (and their children such as forms) are your site’s fundamental building bricks. Things like an author picture and bio make sense to be an object template so its code can be used throughout the site without duplication. This allows you to quickly make global changes to every appearance of this template on your site without having to edit each individual page.
Object templates can be populated from automated data sources within Phosis, or have their information entered directly.
Using object templates in content block containers
Data Sources¶
Data Sources are how you populate object templates with actual data & content. They can be plain HTML or text that you input directly, which is similar to how most CMSes work, or you can choose to hydrate objects using a data source such as articles or Custom Data with various sorting and mapping options.