ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

How To Create a Static Page?

November 12, 2012 4:18pm

Subscribe [2]
  • #1 / Nov 12, 2012 4:18pm

    99developer

    16 posts

    I’m new to EE and still trying to learn it. I’m a bit confused by static pages. Are they supposed to be using channels, too? Seems like I should be using the Pages Module, but I’m not clear about how to do this. So far, this is what I have done (which I think is wrong because I don’t think I did anything explicit with the Pages Module):

    Create Channel for “Static” pages
    1. In the main menu, go to Admin -> Channel Administration -> Channels
    2. click on “Create a New Channel” button on the top right
    3. In “Full Channel Name” field, put “Static”
    3. Click “Submit” to save the Channel

    Create Channel Field Group for “Static” pages
    1. In the main menu, go to Admin -> Channel Administration -> Channel Fields
    2. Click on “Create a New Channel Field Group” button on the top right
    3. In “New Group Name:” field, put “Static Fields”

    Create Channel Fields for “Static” field group
    1. After being redirected to “Channel Fields” page, click on “Static Fields” ling in the table’s “Group Name” column
    2. Click on the “Create a New Channel Files” button on the top right
    3. In “Type” field, select “Textarea” from the drop down menu
    4. In the “Field Label” field, type “HTML Content” (this assumes there will only be one field input for static pages)
    5. Click “Submit” to save Channel field

    Associate Channel with Channel Group (which contains Channel Fields)
    1. In the main menu, go to Admin -> Channel Administration -> Channels
    2. Click “Edit Group Assignments” for the “Static” column
    3. In “Channel Field Group”, select “Static Fields” from the drop down menu
    4. Click “Update” to save the association

    Create Template for “Static” pages
    1. In the main menu, go to Design -> Templates -> Edit -> Create Group
    2. In “Template Group Name” field, put “static”
    3. Click “Submit” to save the template group
    4. After being redirected to “Template Management” page, click on “index” under the “Edit Tamplate” column of the “Tamplate Group Name: static” table on the right
    5. After being redirected to “Edit Template: static/index” page, put this in the “From Database” text area:

    {exp:channel:entries channel="static"}
     {html_content}
    {/exp:channel:entries }

    6. Click “Update and Finished” to save the template

    Create a Static Page
    1. In the main menu, go to Content -> Publish -> Static
    2. In the “Title” field, put “About Acme Factory”
    3. In the “HTML Content” field, put the HTML content of the static page
    4. Click the “Pages” tab
    5. In the “Pages URI”, put “/about/”
    6. In the “Template” field, select “static -> index” from the drop down menu

    View the Static Page
    1. Go to the front end’s /about/ page

  • #2 / Nov 12, 2012 6:32pm

    Boyink!

    5011 posts

    Probably best to peruse this series:
    http://www.train-ee.com/courseware/free-tutorials/comments/pages-module-1-an-introduction-and-history

    (Short answer, no you don’t need the Pages module to create page-based content. The Pages Module is great for URL needs that don’t match up to how EE wants to work with URLs, or to re-use one template from multiple Channels via the Pages module).

  • #3 / Nov 12, 2012 7:45pm

    99developer

    16 posts

    I’ll go through the tutorial you provided. Thanks.

    With the steps I listed:

    1. Is that the “general” correct process of using Channels?
    2. I was able to make a single page that appeared on domain.com/index.php/about/ using the process. Is this a viable process for making static pages?

  • #4 / Nov 14, 2012 4:26pm

    Dan Decker

    7338 posts

    Hi 99developer,

    Thanks for posting to the forums!

    Your process for creating channels is just fine! As Mike says, you don’t need to use Pages to do this. You can use templates in your default template group. So you could have:

    site/about

    The you would have you “page” channel entries tag that pulls the “about” page entry.

    ~

  • #5 / Nov 14, 2012 4:36pm

    99developer

    16 posts

    When would I want to use the Pages module, then? I hope I’m not using an unnecessarily long method that can be done in a simpler way.

  • #6 / Nov 15, 2012 3:41pm

    99developer

    16 posts

    Dan, following up. I’d like to know when and how to use the Pages module.

  • #7 / Nov 16, 2012 3:29pm

    Dan Decker

    7338 posts

    Hi 99developer,

    The Pages Module is best for an “About Us” type of page. Where the content won’t change much over time.

    Does that help clarify a bit?

    Cheers,

  • #8 / Nov 18, 2012 1:50pm

    99developer

    16 posts

    Dan, I think my confusion is due to the fact that the Pages Module seem to be connected to a Channel. Thus, I’m wondering if I’m actually making an entry in Channel or creating a “static” page. If the page is an “About Us” type of page, why do I need a channel?

    Say I wanted to display just the following:

    <h1>Hello World!</h1>

    And I wanted it to appear on http://www.domain.com/index.php/hello-world/ ... what’s the need of a Channel in this scenario?

  • #9 / Nov 20, 2012 5:40pm

    Dan Decker

    7338 posts

    what’s the need of a Channel in this scenario?

    There is no need for a channel as long as “hello-world” is a template group and you have your static content in the index template of that group.

    You would use a “pages” channel only if you wanted to manage the content using the CMS tools in ExpressionEngine.

    Cheers,

  • #10 / Nov 20, 2012 7:56pm

    99developer

    16 posts

    So use template group for a static “hello world” page and manage it via editing the template files. Use a channel if I want to manage the content in the CMS tools. Right?

    So, I think I’m back to my question: when should I used Pages Module? It seems like this is the “right” way for creating/managing simple static pages. I assume it’s better than managing things via template files—but I’m confused why it needs to be connected to a channel. If it’s connected to a channel, isn’t that the same as using the Channel Module?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases