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:
- 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 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:
type: blog
: This option specifies that the route is a blog route.id: 121
: This option specifies the ID of the blog.before
: This section is displayed before the blog.after
: This section is displayed after the blog.limit: 25
: This option limits the number of blog posts displayed to 25.subtype: drupal
: This option specifies that the blog is a Drupal blog.database: drupal_wdp
: This option specifies the database name for the Drupal blog.dbprefix: webdevpower
: This option specifies the database table prefix for the Drupal blog.subtype: wordpress
: This option specifies that the blog is a WordPress blog.database: wordpress
: This option specifies the database name for the WordPress blog.
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