<?php require('hernyo/system/start.php'); $cms = new HRCms(); ?> <!-- #1 Include CMS header. -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php $cms->Title('home_title'); ?></title> <!-- #2 Allow website title editing. -->
<link rel="stylesheet" type="text/css" media="screen" href="<?php $cms->CSS(); ?>" /> <!-- #3 Include CSS. -->
<?php $cms->ControlPanel(); ?> <!-- #4 Include CMS control panel. -->
<?php $cms->ContentHTML('home_content'); ?> <!-- #5 Add editable content area. -->
<?php $cms->LoginLink(); ?> <!-- #6 Generate login link. -->
Some kind words from the community...
"I can't begin to describe to you what a life saver it is not having to rebuild an entire site on a CMS platform."
"Overall, a very quick way to start up a stable, dynamic site with minimal overhead!"
"Thanks for such a killer cms that is so simple.. great concept!"
Integration with an existing website.
Any web page file will work (.php
). If you would like to use it with an .html
file, first convert it to .php
by changing the file extension. (Also remember to change your internal links to .php
- To activate hernyo on a page, insert the following code before your opening
<html> tag. It is possible that you may need to change this path depending on where you've uploaded hernyo master.
<?php require('hernyo/system/start.php'); $cms = new HRCms(); ?>
- To enable "title editing", insert the following code inside your
<title> tag. custom_name can be anything you like. Alphanumeric and underscore characters are supported. We personally recommend a naming convention of pagetitle (Examples: **hometitle, about_title**).
TIP: If you'd like another page to use the same title, use the same custom_name.
<?php $cms->Title('custom_name'); ?>
- Include the CSS used by hernyo master: insert the following code inside of your
<link rel="stylesheet" type="text/css" media="screen" href="<?php $cms->CSS(); ?>" />
- When logged into hernyo master, this will enable the control panel to appear. Insert the following code just after your opening
<?php $cms->ControlPanel(); ?>
- The following lines will place editable content areas. These will display any content assigned to the custom_name, and when you are logged in, will enable you to edit them. If the assigned content does not exist, a placeholder will be created automatically. Insert these anywhere in between your
These editable content areas come in two flavours: HTML and string.
The HTML content area is the most common. These areas can contain many paragraphs, images, headers, links and more.
Create an HTML area like this:
<?php $cms->ContentHTML('custom_name'); ?>
The string content area is used for single lines of text. When used, these are generally placed inline between the header and paragraph tags themselves as per your convenience.
Create a String area like this:
<?php $cms->ContentString('custom_name'); ?>
Again, custom_name can be anything you wish. Personally recommend a naming convention of pagecontent (Example: homemain, homesidebar, aboutcontact, all_copyright etc.).
TIP: If you would like to display the same content across multiple pages, use the same custom_name. This is useful for content such as copyright information.
- Login Link (Optional). You may want to place a link on the page for easy access to the hernyo login page. If this is the case, use the following line of code:
<?php $cms->LoginLink(); ?>
Or even simpler:
- Visit the page you would like to edit (you will be re-directed here after login).
- If you created a login link, use that now. Otherwise you can get to the login page by visiting the /hernyo directory directly (Example: http://www.example.com/hernyo. If the login is a success, you will re-directed to the previous page in editor mode.
- You will notice two things after successfully logging in: A control panel will appear at the bottom of your page. Depending on how many editable content areas you added during your integration, there will be a number of edit buttons scattered throughout your web page. Use these buttons to edit the section associated with it.
- Edit buttons will direct you to a content editor. Make your changes here and click save. If all has been done correctly, you should be redirected to your live page, with your changes applied.
- Logout! Logging out is essential for preventing unauthorized changes to your website by anyone using the same computer.
You may want to upgrade your version of Hernyo Master down the road.
- Back up your settings and content: FTP into your web server. Go to the /hernyo directory and back up your /hernyo/config.php file and /hernyo/content directory.
- Delete the /hernyo directory and replace it with the new version. Download the latest version of hernyo master. Remove the /hernyo directory that is currently on your web server. Extract and upload the new /hernyo folder to the former installation location on your web server.
- Re-upload your config.php file and /content directory to the new hernyo master installation. Replace as necessary.
- Upgrade complete! You can confirm your update by logging into hernyo master. The version number is displayed in the top-left of the menu bar. Remember, you may need to explicitly clear your browser cache after the update in order to see all of the changes.