Creating a template for blog article
On blog article page, you have access to blog object and special article object. Blog article page is where you'd usually edit your article so in this example all fields of current article will also be editable.
<html> <head> <title>{{ page.title }} - {{ article.title }}</title> {% stylesheet_link "style.css" %} {{ blog.rss_link }} </head> <body> <h1>{% editable article.title %}</h1> <p class="article_properties"> Created on {{ article.created_at | date : "%d.%m.%Y" }} by {{ article.author.name }}, <a href="{{ page.url }}">See all articles</a> </p> {% editable article.excerpt %} {% editable article.body %} <hr /> <a href="{{ blog.rss_url }}">Subscribe to RSS feed</a> </body> </html>
- Basics
- Variables
- Filters
- Components
- Localization
- Keyboard shortcuts
- Objects
- Article
- Asset
- Blog
- Comment
- Element
- Language
- Mediaset
- Menu item
- Page
- Person
- Site
- Tag
- Data
- Tags
- addbutton
- assign
- blogcontext
- case
- capture
- commentform
- content
- contentblock
- cycle
- editable
- elementscontext
- for
- grouped
- if
- ifchanged
- image
- include
- load
- login
- loginblock
- menuadd
- menubtn
- menulink
- reorder
- rss_link
- stylesheet_link
- unless
- xcontent
- Examples
- Creating a navigation menu
- Creating language selection
- Blog page example
- Blog article example
- Complete page example
- Breadcrumbs
- Standard theme definition
- Elements listing
- Element page
- Components