Typeset2 is a simple open-source content management system that can be added to most any bare-bones PHP website. It's ideal for small custom hand-made sites that need to allow the client to update small bits of content themselves.
You add it to your website, vs. having to adjust your workflow and build your website around the CMS.
Widgets spit out compliant HTML without any styles, and all content's HTML can be edited.
Have a stupid client that can't be trusted with a WordPress site? Perfect.
Rather than a separate admin area, users can click on the content they'd like to edit and do so right on the page.
Markdown text formatting to give users enough control to format their text, but not enough to make it ugly.
Images are resized client-side before they're uploaded, so large images can be used without having to worry about resource limits.
html/edit
folder to the root level of the website. database_template.sql
file. <? include "/edit/include.php" ?>
at the top of any pages that should display managed content. yourwebsite.com/edit
Sequencial posts with dates, titles, an image, and a body of text, best for things like news articles, press releases, blogs, events, or any kind of content that needs to be organized by date.
Posts given a date in the future will be saved for later and published on that date, so posts can be created in advanced and automatically published at a specific date.
<? $typeset->blog(array(
# Required
"tag" => "example_blog", # A unique name given to the content
"page" => "post.php?topic=", # Link to full article
# Optional
"title" => "My Blog", # Adds heading to the top of content
"id" => "my-blog", # Adds id selector to content
"items" => 10, # Limits the number of items returned
"scope" => "past", # past/future/all
"sort" => "date", # date/id/title/tag - Property to sort by
"order" => "desc", # desc/asc
"skip" => 0, # Skip a designated number of items
"image_width" => 1000, # Max image width
"image_height" => 1000, # Max image height
"thumb_width" => 200, # Max thumbnail width
"thumb_height" => 200, # Max thumbnail height
"truncate" => 0, # Truncates the posts to short blurbs of x characters
"format" => "html", # html/json/raw
"template" => "template_file" # Override the default HTML template with your own template file
)) ?>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
A blurb is a bit of image/text content that doesn't appear in a group or sequence, ideal for things like an "about us" section or any bit of text.
<? $typeset->blurb(array(
# Required
"tag" => "example_blurb", # A unique name given to the content
# Optional
"id" => "about-me", # Adds id selector to content
"image_width" => 1000, # Max image width
"image_height" => 1000, # Max image height
"format" => "html", # html/json/raw
"template" => "template_file" # Override the default HTML template with your own template file
)) ?>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Just HTML, great for things like 3rd-party embed codes, videos, or anything else not covered by the other widgets.
<? $typeset->html(array(
# Required
"tag" => "example_html", # A unique name given to the content
# Optional
"id" => "html-widget", # Adds id selector to content
"format" => "html" # html/json/raw
)) ?>
Any HTML will work. This is great for widgets, badges, embedded video etc.
/edit/templates
folder. Each content type has a minimal default template, but that can be overridden by creating a new template file and passing the "template" option to the class, pointing to your new file. <?= $typeset->post_title() ?>
, which is useful for things like <title>
meta tags.