Variable Reference
When a request is processed on the Mephisto public page, the request goes through a dispatch action with three basic stages:
- Dispatch (figure out what action to call)
- Processing (execute the action, pull required data from the database)
- Render (build the templates and display the page)
The global variables (variables that are available in every template are:
- site
Variables
Site
This represents the current site object. The Site object has these properties:
- id: ID of the Site
- host: the domain name of the current site. ex: ‘mephistoblog.com’
- title: Title of the (current) Site
- subtitle: Subtitle of the (current) Site
- articles_per_page: Gives you the number of articles to be displayed per Page
- tag_path: Path to the tags area, default is ‘tags’
- search_path: Path to the search area, default is ‘search’
- accept_comments: Boolean value determining if comments are allowed for this site.
- sections – Array of the sections in this site.
- blog_sections – same as above, but only blog type sections.
- page_sections – same as above, but only page type sections.
- tags – An array of the article tags for this site.
Article
- id: ID of the article
- title: Title of the article
- permalink: Permanent link fragment (unchanging url) to the article. (2006/7/23/another-test-article)
- url: Full permalink to the article (/2006/7/23/another-test-article)
- comments_feed_url: Url to the comment ATOM feed.
- changes_feed_url: Url to the article changes ATOM feed.
- excerpt: Excerpt of the article.
- body: Body of the article.
- content: Either the full body on single article pages, or the excerpt (if used) on article listings.
- published_at: Date the article was published
- updated_at: Date the article was last updated
- comments_count: Number of comments the article has.
- accept_comments: Boolean value determining if comments are allowed.
- is_page_home: Boolean indicating whether this article is the index of a paged section.
- comments: Array of all the comments for this article.
- sections: Array of all the sections this article is attached to.
- blog_sections: Same as above, but only blog type sections.
- page_sections: Same as above, but only page type sections.
- tags: Array of the tags for this article.
Section
- id: ID of the section
- name: Name of the section
- path: Path of the section (e.g. A section named Tips and Tricks would have a path of tips-and-tricks unless a custom path was specified in the admin)
- url: Full url to the section.
- is_home: Boolean returning whether or not the current section is the home section.
- is_paged: Boolean returning true if the section is a paged section.
- is_blog: Boolean returning true if the section is a blog section.
- articles_count: Number of articles attached to this section.
- archive_path: Path to the archives section for this section. Default is ‘archives’
- articles: Latest articles for this section.
- comments: Latest comments for any article in this section.
- pages: All the paged articles for this section in their custom order.
- earliest_month: Month of the earliest article in this section.
- months: Array of dates for the earliest article in this section to now.
Comment
- id: ID of the article
- title: Title of the article
- permalink: Permanent link fragment (unchanging url) to the article. (2006/7/23/another-test-article)
- url: Full permalink to the article (/2006/7/23/another-test-article)
- body: Body of the article.
- published_at: Date the article was published
- created_at: Date the comment was posted
- author: Name of the comment poster.
- author_email: Email of the comment poster.
- author_ip: IP Address of the comment poster.
- author_url: HTTP URL of the comment poster, if given.
Categories
Community
- Mephisto Google Group
- Theme Gallery [0]
- Theme Gallery [1]
- Step by Step Tutorial
- Wiki
- Say hi in #mephisto on irc.freenode.net
About Mephisto
Mephisto was baked to golden perfection by Rick Olson(Development) and Justin Palmer(UI/Design) with contributions from a bunch of cool people.
