2017 © Pedro Peláez
 

magento-module typecms

image

rskuipers/typecms

  • Tuesday, March 29, 2016
  • by rskuipers
  • Repository
  • 5 Watchers
  • 21 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 7 Forks
  • 2 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

TypeCMS

Magento module which adds page types to the CMS., (*1)

backend backend, (*2)

The above was achieved purely with xml., (*3)

Features

TypeCMS was developed to allow for more flexibility with the Magento CMS. TypeCMS introduces page types which have their own custom backend fields and frontend templates. Define custom page types through XML Define custom backend fields for your page types through XML Define custom templates for your page types through XML Optionally add your own backend model to handle your fields as you wish., (*4)

Usage

The recommended way of creating page types is by creating a separate custom module with the page types defined in its config.xml. Optionally you can just put your page types in the app/etc/modules/RK_TypeCMS.xml file. Defining a page type, (*5)

    <global>
        <page>
            <types>
                <test> <!-- This is the code of your page type (required) -->
                    <label>Test</label> <!-- The page type's label (required) -->
                    <model>typecms/page_type_default</model> <!-- Render the backend fields yourself (optional) -->
                    <block>typecms/page_type_default</block> <!-- Define the block used to display the page -->
                    <template>typecms/default.phtml</template> <!-- Use this template to render the page (optional) -->
                    <handle>typecms_default</handle> <!-- Add a layout handle to the page (optional) -->
                    <attributes> <!-- A list of all the attributes for the page type (optional) -->
                        <name> <!-- Code of the attribute (required) -->
                            <label>Name</label> <!-- Label of the attribute (required) -->
                            <type>text</type> <!-- The type of data, this also determines the field to be rendered. (required) -->
                            <!-- Options: text, editor, int, select, yesno, file, image. -->
                        </name>
                        <age>
                            <label>Age</label>
                            <type>int</type>
                        </age>
                        <gender>
                            <label>Gender</label>
                            <type>select</type>
                            <options> <!-- Options of the select -->
                                <male>Male</male> <!-- "Male" is the option label, "male" is the option value. -->
                                <female>Female</female>
                            </options>
                        </gender>
                        <married>
                            <label>Married</label>
                            <type>yesno</type>
                        </married>
                        <picture>
                            <label>Picture</label>
                            <type>image</type>
                        </picture>
                        <cv>
                            <label>CV</label>
                            <type>file</type>
                        </cv>
                        <introduction>
                            <label>Introduction</label>
                            <type>editor</type>
                        </introduction>
                        <signature>
                            <label>Signature</label>
                            <type>textarea</type>
                        </signature>
                    </attributes>
                </test>
            </types>
        </page>
    </global>

The above defines a page type (in this case the default page type) called Default with its own template and attributes., (*6)

Changelog

Version 3.1.0 (29-03-2016) + #11 Add custom handles (thank you @adamj88), (*7)

Version 3.0.0 (12-08-2015) + [BC break] Introduce support for Bubble CMS (previously Clever CMS) (thank you @adamj88), (*8)

Version 2.1.0 (17-01-2014) + Add Collection page type, allows you to easily read out a page's children and display their information (currently CleverCMS only) + Add docblocks to everything + Add block types and option to define a block type for a page type + Add modman support - Fix issue with attributes being reinstalled during setupAttributes() - Fix issue when database prefixes are used - Minor bug fixes, (*9)

Version 2.0.4 (03-01-2014) - Fix issue with template not showing, (*10)

Version 2.0.3 (05-12-2013) - Fix compatiblity issue with Clever CMS, (*11)

Version 2.0.2 (28-11-2013) + Add template processor to default template (to parse widgets and such), (*12)

Version 2.0.1 (12-11-2013) - Fix bug where attributes were deleted upon insertion - Fix compatibility issue with Clever CMS, (*13)

Version 2.0.0 (29-09-2013) + Added file field + Added image field + Added yes/no field + Added select field - Changed field types to represent frontend type instead of backend type - Fixes #2 - Fixes #1, (*14)

Version 1.0.2 (15-09-2013) - Fixed the int and varchar table's value column types., (*15)

Version 1.0.1 (15-09-2013) - Fixed incorrect directory structure, (*16)

Version 1.0.0 (01-09-2013) - Initial release, (*17)

The Versions