Your first site

From Snapp CMS Developer Documentation

Jump to: navigation, search

So you've purchased a subscription to SnappCMS and want to build your first site. Where do you start?

This page is designed to give you a quick step-by-step on setting up and customizing your first SnappCMS site. Follow the steps below and you'll be up and running in no time!

Contents

Design your Sitemap

The first thing to do is create your sitemap, which determines the structure of your site. This is done using the SnappCMS administration system. You can log into the system by going to http://<your_host_name>/cms

When you signed up, you will have been sent an email containing your username and password for accessing the SnappCMS administration system. If you are unsure of what your hostname is yet, the email will tell you your temporary hostname so you can get started.

Click on the "Website Manager" tab and follow the instructions to lay your sitemap out. For more information on the types of pages that are available to you, read up on Modules

Lay out your site's master Template

Your master template (known by some CMSs as a "layout") is used for rendering components shared across all pages. Typically, these include the header, footer and global navigation components.

The master template resides in /templates/default/index.php. Your introductory email will give you details of how to access your folders via FTP so that you can change it.

More information on master templates can be found in Master Templates


Lay out your page templates

When you laid out your sitemap, you choose particular "page types" for each new page you created. For example, you may have added a few "Standard Content" pages, a Blog, and a "Links" page.

In developer-speak, each of these page types is handled by a code "module" (see Modules).

Each module can have one or more templates associated with it, depending on how you wish your specific pages to be laid out. Information on how to create module templates is located in Module Templates.

Set up your Forms

Forms are just another page type that you can edit using the Administration system. To have a basic form display, render and validate, the code is very simple. Here's a basic form template file:

<?php
if(!empty($form->title)) {
	echo '<h1 class="moduleTitle">'.$form->title.'</h1>';
}

?>
<div class="moduleContent">
<?php
	if(!empty($form->summary)) {
		echo str_replace('<br>', '<br/>', $form->summary);
	}
	echo $form->render();
?>
</div>

You can find more information about customizing how forms are processed at Forms

Customize Away

Do you need to build a type of page using a module that isn't built into SnappCMS yet? You can create your own page Modules using the instructions at Modules_(Adding_custom). The possibilities are endless!

Do you want to insert snippets of content into multiple pages, or even all pages? Check out Widgets.

Go live!

Going live is usually just a matter of pointing your site's DNS records across to your virtual host.

In your introductory email, you will find your Snapp hostname and your IP address.

The Snapp hostname takes the form sxxxxx.snappcms.com.au, where xxxxx is a series of numbers.

With most sites, there are two DNS records to attach: yourdomain.com and www.yourdomain.com.

We recommend you set up a CNAME record to map www.yourdomain.com to your sxxxxx.snappcms.com hostname, and an A record to point yourdomain.com to your IP address.

e.g. you would have the following:

www.yourdomain.com. 3600	IN	CNAME	s98765.snappcms.com.au.
yourdomain.com.           3600	IN	A	117.20.1.43

Depending on your DNS provider, it may take up to 48 hours before your changes propagate and people can see your site. Once they do, you're in business!

Personal tools
Core Components
Standalone Installs