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:

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:

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