In ACR every piece of content is called SLICE.
To add a content, click on ADD SLICE in the top bar. You will see the list of available slices. The available slices depends on installed plugins. Clicking on a slice type, the create page will appear. Mind that the new slice will be created on the page where you were when you clicked on the slice type.
Common Slice Fields¶
Every slice type edit page has these standard fields:
Namethe name of the slice, for your reference
Zonethe page zone where the content will appear
Tagsthe content tags of the content
Languagethe language of the content, usefull for internationalize of your website.
HTML slice contains only a rich badass WYSIWYG editor, where you can freely insert any kind of content. The image insert uses ACRcms’s assets manager to store and retrieve your contents. Please refer to the CKEditor user guide for the complete how to.
GENSHI slice permits you to add Genshi Template Directives, such as conditions, loops, etc... to your content.
Consider this snippet of Genshi code:
<div py:for="i in range(7)"> this is cool :) </div>
it will return something like this:
this is cool :) this is cool :) this is cool :) this is cool :) this is cool :) this is cool :) this is cool :)
ACRCms injects some useful variable in Genshi slice:
acr.slices_with_tag(tag): returns all the slices with the given tag acr.page_from_urllist([urls]): given the url hierarchy, returns the page object acr.preview_slice(page, slice): renders the preview of a slice acr.render_slice(page, slice): renders a slice acr.url(url, **params): returns the project relative encoded url acr.request : the current WebOb request acr.depot : a key-value storage that can be used to store or retrieve data page.url: the url of the current page page.i18n_title: the internationalized title of the current page page.ancestors: iterable of the current page ancestors page.children: iterable of the current page children slice.tags: iterable of the tags associated with the current slice slice.name: the name of the current slice
You can also access all the helpers using the variable
Ajax loaded content.
rss aggregator, add the rss feed uri and eventually a tag filter and it magically works.
What the hell, Twitter supports only Atom feeds :)
Insert a downloadable file using the asset manager. Choose an asset using the assets box, or upload a new one. For further reference, please read ACRcms’s assets manager.
An automatic submission form creator. The syntax is pretty simple,
fieldname=fieldtype, one for row. Available field types:
textsingle line text field
textareamultiline text area
select field, comma separated values inside square brackets
A little example:
Name=text Content=textarea Sex=[Male, Female]
will be rendered as:
Insert an image using the asset manager. Choose an image using the assets box, or upload a new one. For further reference, please read ACRcms’s assets manager.
You can also set the image size, an external link and the image title.
Inserts a simple search bar. It’s possible to restrict the search on selected tags.
Insert a video using the asset manager. Choose a video file using the assets box, or upload a new one. For further reference, please read ACRcms’s assets manager.
You can also set the video size and the video title.
The video will be automatically converted to a web suitable format.
Tag cloud that aggregates the tags of your slices.
Adds a bar with two links to add or edit slice group contents.
Adds a discussion thread to your page using the disqus comment system. You must configure the plugin with your disqus User ID before using it. Refer to Disqus Config for more details.
Google Maps Plugin, you have only to fill the address field and configure the zoom level and the map size.
The blog articles slice aggregates all the post of a blog category. You must have configured at least one blog category, refer to Blog Config.
A complete photogallery plugin, with categories and thumbnails generator. The use is simple, just add the slice, then select the album and it’s done. To add and manage albums refer to Photo Config.