Open Sitez Documentation

Documentation main page

 

What are blogs?

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 blogs in Open Sitez:

blog:
  type: blog
  id: 121
  before:
    - {type: text, content: "<div class='blog' style='background-color:white;margin-top:30px;padding-top:20px'>"}
  after:
    - {type: text, content: </div>}
  limit: 25
drupalblog:
  type: blog
  subtype: drupal
  database: drupal_wdp
  dbprefix: webdevpower
wpblog:
  type: blog
  subtype: wordpress
  database: wordpress
databases: {type: blog, id: 124}
php: {type: blog, id: 126}

Parameter explanations:

Standard blogs:

The php and database routes are standard blogs. This means that they are not Drupal or WordPress blogs. They are simply blogs that are created and managed using Open Sitez.

Drupal blog:

The drupalblog route is a Drupal blog. This means that it gets its data from a Drupal database. The database and dbprefix options are required for Drupal blogs. The database option specifies the database name for the Drupal blog. The dbprefix option specifies the database table prefix for the Drupal blog.

WordPress blog:

The wpblog route is a WordPress blog. This means that it gets its data from a WordPress database. The database option is required for WordPress blogs. The database option specifies the database name for the WordPress blog.

Limiting the number of entries:

You can limit the number of blog posts displayed by using the limit option. The limit option takes a number as its value. This number specifies the maximum number of blog posts to display.

Putting content before and after:

You can put content before and after your blog 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='blog' style='background-color:white;margin-top:30px;padding-top:20px'> tag before the blog and a