Using The Flatpage Application

The Flatpages application in Ellington is used for pages that are not tied to any Ellington pre-existing views. The most popular uses for flat pages are “Contact Us” types of pages or where a form must be created to submit information.

Each flat page has a url, title, content area, the option to enable comments and a flag to require registration in order to view the page on the Web site. Flat pages can be structured so that the main content appears in the administrative interface or in the template. The choice between where to place content largely relies on the type of flat page that is being created. A page with a contact form would likely have all components in the template, where a page with mostly written material may have limited design needs, and would utilize the text field in the flat page.

Flatpages

Adding a Flatpage

To add a flat page, follow these steps:

  1. Click on the Add Flat page button.
  2. Enter in the necessary fields required to compose the flat page. The content area can have relevant content, or in cases where the content is stored primarily in a template, can have a single word as a place holder.
  3. Click Advanced Options to display additional settings.
  4. Choose any advanced options or enter a template to use for the page.
  5. Click the Save button.
Add a Flatpage

Advanced Options

Under the Advanced Options Tab, you can choose to enable or disable Comments for this flatpage. Whether this flatpage requires registration to access. You can specify a custom template as well as a custom response type.

The custom template should point to relative location (typically the flatpages directory) and a file name that you want to use.

The custom response type will allow you to update the header mime types of the flatpage to render either JSON or XML instead of the regular HTML as needed.

Refer to the get_latest_objects template tag in your dev documentation on how to retrieve the XML or JSON feed into the template. Setting the proper mime type above will render the returned results to the page. From there you can format them however you would like.

0 Comments

Add your comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.