Advanced Content Manager pour Magento 1

Template description and override

Introduction

Advanced content manager allow you to overriding any templates used for frontend, but it also allow you to create your own templates file in a very easy way.

 

Overriding existing templates

Templates files are placed under app/design/base/default/template/contenttype folder.
If you simply want to rewrite an existing template, copy it to your package/theme folder an modify what you need. Like it works for every templates files in Magento actually...

Example:
Copy app/design/base/default/template/contenttype/search/results.phtml
To app/design/my_package/my_theme/template/contenttype/search/results.phtml

 

Creating your own templates

In order to have a different template for a content type from the other, or have a different look for a field than the other, advanced content manager is equiped of dynamic template name construction.
Below is a list of all templates files, their role and their possible specific template renaming.

We are implying speaking about the folder frontend/package/theme/template/contenttype/

 

list.phtml

Role: Used for list of contents
Block type: contentmanager/list
Dynamic template name: None, rename it when creating the block by using setTemplate method, or inline template attribute.

 

menu.phtml

Role: Output a menu
Block type: contentmanager/menu
Dynamic template name:
contenttype/menu-IDENTIFIER.phtml
contentype/menu.phtml
Where IDENTIFIER stand for menu unique identifier.
Example:
contenttype/menu-main.phtml

 

menu/item-block.phtml

Role: Output a menu CMS block item (ouput a cms block in the menu)
Block type: contentmanager/menu_item
Dynamic template name:
contenttype/menu/item-block-IDENTIFIER.phtml
contentype/menu/item-block.phtml
Where IDENTIFIER stand for menu unique identifier.
Example:
contenttype/menu/item-block-main.phtml

 

menu/item-category.phtml

Role: Output a menu category item (link to a category)
Block type: contentmanager/menu_item
Dynamic template name:
contenttype/menu/item-category-IDENTIFIER.phtml
contentype/menu/item-category.phtml
Where IDENTIFIER stand for menu unique identifier.
Example:
contenttype/menu/item-category-main.phtml

 

menu/item-content.phtml

Role: Output a menu content item (link to a content)
Block type: contentmanager/menu_item
Dynamic template name:
contenttype/menu/item-content-IDENTIFIER.phtml
contentype/menu/item-content.phtml
Where IDENTIFIER stand for menu unique identifier.
Example:
contenttype/menu/item-content-main.phtml

 

menu/item-custom.phtml

Role: Output a menu custom item (link to a custom URL)
Block type: contentmanager/menu_item
Dynamic template name:
contenttype/menu/item-custom-IDENTIFIER.phtml
contentype/menu/item-custom.phtml
Where IDENTIFIER stand for menu unique identifier.
Example:
contenttype/menu/item-custom-main.phtml

 

menu/item-node.phtml

Role: Output a menu node item (node tree which only list his children)
Block type: contentmanager/menu_item
Dynamic template name:
contenttype/menu/item-node-IDENTIFIER.phtml
contentype/menu/item-node.phtml
Where IDENTIFIER stand for menu unique identifier.
Example:
contenttype/menu/item-node-main.phtml

 

menu/item-page.phtml

Role: Output a menu page item (link to a page)
Block type: contentmanager/menu_item
Dynamic template name:
contenttype/menu/item-page-IDENTIFIER.phtml
contentype/menu/item-page.phtml
Where IDENTIFIER stand for menu unique identifier.
Example:
contenttype/menu/item-page-main.phtml

 

menu/item-product.phtml

Role: Output a menu product item (link to a product)
Block type: contentmanager/menu_item
Dynamic template name:
contenttype/menu/item-product-IDENTIFIER.phtml
contentype/menu/item-product.phtml
Where IDENTIFIER stand for menu unique identifier.
Example:
contenttype/menu/item-product-main.phtml

 

search/results.phtml

Role: Output content search results.
Block type: contentmanager/search_results
Dynamic template name:
None, rename it when creating the block by using setTemplate method, or inline template attribute.

 

view.phtml

Role: Output a content
Block type: contentmanager/view
Dynamic template name:
contenttype/view-CONTENTID.phtml
contenttype/view-CTID.phtml
contentype/view.phtml
Where CONTENTID stands for the content itself ID (unique number, foundable in the grid of content in the admin panel); and CTID stands for content type identifier.
Examples:
contenttype/view-153.phtml
contenttype/view-news.phtml
contentype/view.phtml

 

view/layout-*.phtml

Role: Output a content based on a prebuilt layout (1column, 2 columns, 3 columns)
Block type: contentmanager/view
Dynamic template name:
None, rename it when creating the block by using setTemplate method, or inline template attribute.

 

view/block.phtml

Role: Output the content of a CMS block, coming from a prebuilt layout or displayed with the render() method.
Block type: contentmanager/view_block
Dynamic template name:
contenttype/view/block-CONTENTID.phtml
contenttype/view/block-CTID.phtml
contentype/view/block.phtml
Where CONTENTID stands for the content itself ID (unique number, foundable in the grid of content in the admin panel); and CTID stands for content type identifier.
Examples:
contenttype/view/block-153.phtml
contenttype/view/block-news.phtml
contentype/view/block.phtml

 

view/option/*.phtml

Role: Output the formatted value of a content field depending of his type. Coming from a prebuilt layout or displayed with the render() method.
Block type: contentmanager/view_option
Dynamic template name:
contenttype/view/option/FIELDTYPE-CONTENTID.phtml
contenttype/view/option/FIELDTYPE-CTID.phtml
contentype/view/FIELDTYPE.phtml
Where FIELDTYPE stand for the field type; CONTENTID stands for the content itself ID (unique number, foundable in the grid of content in the admin panel); and CTID stands for content type identifier.
Examples:
contenttype/view/option/drop_down-153.phtml
contenttype/view/option/checkbox-news.phtml
contentype/view/option/area.phtml

 

view/option/product/*.phtml

Role: Output the formatted value of a content field of the type of “product”. Coming from a prebuilt layout or displayed with the render() method.
Block type: contentmanager/view_option_product
Dynamic template name:
contenttype/view/option/product/FORMATTYPE-CONTENTID.phtml
contenttype/view/option/product/FORMATTYPE-CTID.phtml
contentype/view/product/FORMATTYPE.phtml
Where FORMATTYPE stand for the product output format; CONTENTID stands for the content itself ID (unique number, foundable in the grid of content in the admin panel); and CTID stands for content type identifier.
Examples:
contenttype/view/option/product/product_name-153.phtml
contenttype/view/option/product/product_all-news.phtml
contentype/view/option/product/product_name_price.phtml

 

view/option/content/*.phtml

Role: Output the formatted value of a content relation field. Coming from a prebuilt layout or displayed with the render() method.
Block type: contentmanager/view_option_content
Dynamic template name:
contenttype/view/option/content/FORMATTYPE-CONTENTID.phtml
contenttype/view/option/content/FORMATTYPE-CTID.phtml
contentype/view/product/FORMATTYPE.phtml
Where FORMATTYPE stand for the content output format; CONTENTID stands for the content itself ID (unique number, foundable in the grid of content in the admin panel); and CTID stands for content type identifier.
Examples:
contenttype/view/option/content/content_name-153.phtml
contenttype/view/option/content/content_name_linked-news.phtml
contentype/view/option/content/content_name_linked.phtml

 

view/group/header.phtml

Role: Output the the top HTML of a layout group item, coming from a prebuilt layout.
Block type: contentmanager/view_group_header
Dynamic template name:
contenttype/view/group/header-CONTENTID.phtml
contenttype/view/group/header-CTID.phtml
contentype/view/group/header.phtml
Where CONTENTID stands for the content itself ID (unique number, foundable in the grid of content in the admin panel); and CTID stands for content type identifier.
Examples:
contenttype/view/group/header-153.phtml
contenttype/view/group/header-news.phtml
contentype/view/group/header.phtml

 

view/group/footer.phtml

Role: Output the the bottom HTML of a layout group item, coming from a prebuilt layout.
Block type: contentmanager/view_group_footer
Dynamic template name:
contenttype/view/group/footer-CONTENTID.phtml
contenttype/view/group/footer-CTID.phtml
contentype/view/group/footer.phtml
Where CONTENTID stands for the content itself ID (unique number, foundable in the grid of content in the admin panel); and CTID stands for content type identifier.
Examples:
contenttype/view/group/footer-153.phtml
contenttype/view/group/footer-news.phtml
contentype/view/group/footer.phtml