1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[Docs] Create a Page

Discussion in 'Design and Layout' started by Nick, Nov 17, 2009.

  1. Nick

    Nick Well-Known Member

    It's very easy to make a physical, static page with Hotaru CMS. Here's an example:

    1. Create a faq.php file and put it in your theme folder:

    PHP:
    <?php
     
    /**
     * FAQ for my site
     */
    ?>

    <p>THIS IS THE FAQ for <?php echo SITE_NAME?></p>

    2. Load it in your browser:


    Default URL: http://www.yoursite.com/index.php?page=faq
    Friendly URL: http://www.yoursite.com/faq/

    That's it, but if you are designing a theme or plugin and want to link to the page, you should use Hotaru's url function which automatically determines whether to output a standard url or a friendly one:

    PHP:
    <a href="<?php echo $h->url(array('page'=>'faq')); ?>">FAQ</a>
     

Share This Page