LoopyCMS Articles
back to LoopyCMS Articles ...
Printer-friendly version

LoopyCMS Administration - Creating Pages

Dateline: September 18, 2003
 

Creating Pages for the site is a process of customizing one of the existing page templates for use on the site.  Currently, there are five basic templates:

  • The default template displays the basic design elements and displays a block specific to that page.
  • The FileList template adds a customizable directory listing of specified filetypes and/or folders in the directory it is located.  It is ideal for a download directory.  It can also display a page-specific block.
  • The ImageNavigator or PhotoAlbum template is a tool to show a series of photographs or images.  Each picture can have a caption and a descriptive block of text specific to that image.  If desired a common block of content can also be included common to all pages in the PhotoAlbum.
  • The Viewer template is intended for displaying individual files from a Content Collection, such as Articles.  It too has the capability of showing a block.  If you create a new content collection content type, it's also nice to include a "printer-friendly" viewer, especially if you use a left-hand (or right-hand) Page Menu.
  • The Redirector template.  The redirector is designed to work with the Viewer, so that links to your individual content items for your Content Collections can be used in a link, rather than specifying a parameter in a querystring.  Here's an example: http://www.yoursite.com/Articles/Example.htm would be redirected to http://www.yoursite.com/Articles/View.asp?File=Example.htm by the redirector.  This makes it easier to create links that people will remember. To use this template, you do have a little website admin work to do.  I won't cover it here in it's entirety, I refer you to the configuration section at the end, for that.  You need to set the Redirector to be the 404 error page for the directory it is in.  This is pretty simple and there are screenshots to guide you through the process.  Basically, what that means is that when a file can't be found in that directory, the server referrs to the 404 page and, in this case, the 404 page simply passes the site user to the viewer page, assuming that the person is asking for an HTML article.  Thus, even though your content file doesn't live in a web accessible directory, it gets referred to the viewer, that knows how to read and display it.

Let's have a go at creating a new page.

When you start the page creator starts, it reminds you to create a block, if you intend to do so.  This way, you can simply select the block you want to use when you get to that point in the process. 

Next, you deside on the type of page you wish to create.

Next, where to put it.  If you see the directory, simply select the radio button next to the file, otherwise, click the one of the "browse"  links to find the folder you're looking for.  The page will reload with a listing of the selected directory.  Finally, you can create a new folder, if needed.  This last option is not the way to create a new Content Collection, if you want to do that, use the Content Type tool.

Once you have selected a directory, create a name for a page. You don't need to add an extension to the filename (it will ignore your extension) because ".asp" is required for all pages.  Also, if you're creating a new directory, you will most likely want to create a default.asp page (in addition to any other pages you want there) so that linking directly to the directory will not return an error. (Example: http://www.yoursite.com/SomeDirectory/)

Ah, the meat and potatoes of the page creation process.  It looks scary, but it's really not.  You're looking at the code that defines the pages on the site.  The only part you need to worry about is the parts that have text input boxes or dropdown lists next to them.  For non-programmers, think of the part to the left of the = sign as code words that stand for the parts of a page.  You have to "fill-in the blank" to define how this page will look.

  • docTitle - ok, now that's just the name of the page.  It's used on the title bar of the browser and in the area immediatly below the Top Menu.  The docTitle of the Page Template Editor is "Page Template Editor" as depicted in the screenshots on this page.
  • docTemplate is the template "style".  Each page on the site can either be "default" (capable of showing all the site design elements), "wide" (disabling the Page Menu and it's MenuInsert) or "printerfriendly" (disabling the Page Menu, MenuInsert, Top Menu and Page Header)
  • docPageHead is the name of the Page Header to use on the page.  You are supplied in the dropdown box with a list of the page design elements for docPageHead and all the following variables.
  • docTopMenu - the Top Menu
  • docPageMenu - the Page Menu
  • docMenuInsert - the Menu Insert
  • docPageFooter - the Page Footer
  • docBlockName - the name of the Block to use for the page.

What if you don't want to use an element on the page?  Simply set it to "off".  For instance, if you decide not to use a left (or right) hand menu on your site, just always set that off.  You could also open up the template itself and change the value to the word "default" to "off" next to Page Menu.

You might note that all of these elements are set to use "default" automatically.  That's because for each, default.htm exists as a file in that content type directory and the template has default as the, well, default value for that element.

docBlockName doesn't have an "off" choice in quite the same way, but the last choice in the list (and the one automatically selected) is simply no value.  That means no block will be displayed, unless you select one.  That's fine for things like the Viewer, which displays the requested file automatically, but most other pages will be pretty boring without a block, since they'll contain no information.

When you hit the submit button, you're all done and you get a nice success message. (Well, we hope!)

Before we move on, I'm going to cover the other variables to customize in the other templates.

  • The FileList template.  These are all True or False choices on whether to show files of certain types or to show folders. The last two choices are a little different as described below.
    • ShowFolders - True by default.  When True, subfolders are displayed as links.  This means you can copy a FileList page to any subdirectory you create. Users of your site will be able to navigate from one directory to another, wherever there are FileList-based pages.  You may want to customize the file options from folder to folder or change the block displayed from folder to folder. This is an excellent and easy way to create a downloads section for your site.
    • ShowASP - True by default.  When True, it shows all the .asp files in the directories as links (one exception - the default.asp page for the directory -- which is assumed to be the page showing the file listing -- is never shown.  Creating a link to the same document would be redundant).
    • ShowHTML - True by default.  When True, it shows all the HTML files in the directory
    • ShowTXT - True by default.  When True, shows text files
    • ShowIMG - True by default.  Supported types: .gif, .jpg, .jpeg, .png.
    • ShowALL - False by default. This would show all files of all types (one exception - the default.asp page for the directory -- which is assumed to be the page showing the file listing -- is never shown).
    • ShowPathInfo will display the name of the current directory, if set to True.  Thus "/downloads" would be displayed for the /downloads directory.  This could be very helpful if you create a number of folders under the downloads directory, allowing people to know where they are.
    • VirtualRoot  would always be false on a LoopyCMS site, unless you manually create sections of the site in virtual directories outside the web root - now you wouldn't want to do that, would you?
  • The ImageNav (PhotoAlbum) template
    • ShowDropDown - False by default. If set to True, this will add a dropdown box displaying the caption above the PhotoAlbum navigation buttons.  If you turn it on, watch the length of your captions.
  • The Redirector template - more technical, but if you use the LoopyCMS recommended viewer filename and global 404 error message pages, you'll never have to change anything.
    • viewer - The default value for the viewer variable is "view.asp?file=", i.e., the name of the viewer file for the directory, plus a question mark to say that more information is coming, and "file=" to supply the type of information that will be coming.  Always include the part with the question mark as is.  If you follow the recommendation to use "view.asp" as your normal viewer application, you'll never have to change this value.
    • error404 - The default value for this variable is "/Support/ErrorMessages/404.asp".  The site global error messages are configured to run from the /Support/ErrorMessages directory.  If a ".htm" page is requested, it gets forwarded to the viewer.  Any other kind of page that can't be found gets directed to the global 404 error page.
  • The Viewer Template
    • viewerContentType - the name of the Content Collection, for example: "articles"
    • pfViewer - The default value is "pfView.asp".  If you want to use another name for the printer-friendly viewer, change the value accordingly.  If you don't want to use a printer-friendly viewer, delete the value in the text input box for this variable.

 Ok, on to Editing PhotoAlbums