Open Sitez Documentation
Documentation main page
What are contents?
Blogs are websites or web pages that are updated regularly with new content. Blog posts are typically written in a conversational style and can cover a wide range of topics, from personal experiences to news and current events.
Blogs can be used for a variety of purposes, including:
- Sharing your thoughts and ideas with others
- Promoting your business or brand
- Building a community around a shared interest
- Keeping a journal or diary
- Documenting your work or research
Example YAML for multiple contents in Open Sitez:
content:
type: content
id: 121
before:
- {type: text, content: "<div class='content' style='background-color:white;margin-top:30px;padding-top:20px'>"}
after:
- {type: text, content: </div>}
limit: 25
drupalcontent:
type: content
subtype: drupal
database: drupal_wdp
dbprefix: webdevpower
wpcontent:
type: content
subtype: wordpress
database: wordpress
databases: {type: content, id: 124}
php: {type: content, id: 126}
Parameter explanations:
type: content
: This option specifies that the route is a content route.id: 121
: This option specifies the ID of the content.before
: This section is displayed before the content.after
: This section is displayed after the content.limit: 25
: This option limits the number of content posts displayed to 25.subtype: drupal
: This option specifies that the content is a Drupal content.database: drupal_wdp
: This option specifies the database name for the Drupal content.dbprefix: webdevpower
: This option specifies the database table prefix for the Drupal content.subtype: wordpress
: This option specifies that the content is a WordPress content.database: wordpress
: This option specifies the database name for the WordPress content.
Standard contents:
The php
and database
routes are standard contents. This means that they are not Drupal or WordPress contents. They are simply contents that are created and managed using Open Sitez.
Drupal content:
The drupalcontent
route is a Drupal content. This means that it gets its data from a Drupal database. The database
and dbprefix
options are required for Drupal contents. The database
option specifies the database name for the Drupal content. The dbprefix
option specifies the database table prefix for the Drupal content.
WordPress content:
The wpcontent
route is a WordPress content. This means that it gets its data from a WordPress database. The database
option is required for WordPress contents. The database
option specifies the database name for the WordPress content.
Limiting the number of entries:
You can limit the number of content posts displayed by using the limit
option. The limit
option takes a number as its value. This number specifies the maximum number of content posts to display.
Putting content before and after:
You can put content before and after your content by using the before
and after
options. The before
and after
options take an array of objects as their value. Each object in the array should have a type
and content
property. The type
property specifies the type of content. The content
property specifies the content itself.
For example, the following YAML will put a <div class='content' style='background-color:white;margin-top:30px;padding-top:20px'>
tag before the content and a