Current version 0.9.0
NordCms is a stand-alone module developed by Nord Software Ltd. This extension provides the core content management system functionality such as multilingual content and in place editing of content to any Yii project. NordCms is licensed under the New BSD License, please see the LICENSE file.
This extension was developed under a period of two weeks and there is definitely still room for improvement here and there. However, I wouldn't have released it to the public unless I was satisfied with it. I will continue working on improving this module in the future as well.
For more detailed information please read the Usage section.
Unzip the extension under protected/modules/cms and add the following to your application configuration:
'imports'=>array( ..... 'application.modules.cms.CmsModule', ), 'modules'=>array( ..... 'cms', ), 'components'=>array( ..... 'urlManager'=>array( ..... 'rules'=>array( ..... 'page/<name>-<id:\d+>.html'=>'cms/node/page', // clean URLs for pages ), ), 'cms'=>array( 'class'=>'cms.components.Cms' ), ),
Next you need to create the necessary database tables by running the schema.sql in the data folder.
The cms application component supports the following configuration parameters:
'cms'=>array( 'class'=>'cms.components.Cms' // the names of the web users with access to the cms 'users'=>array('admin'), // the langauges enabled for the cms 'languages'=>array('en_us'=>'English'), // the default language 'defaultLanguage'=>'en_us', // the types of files that can uploaded as attachments 'allowedFileTypes'=>'jpg, gif, png', // the maximum allowed filesize for attachments 'allowedFileSize'=>1024, // the path to save the attachments 'attachmentPath'=>'/files/cms/attachments/', // the template to use for node headings 'headingTemplate'=>'<h1 class="heading">{heading}</h1>', // the template to use for widget headings 'widgetHeadingTemplate'=>'<h3 class="heading">{heading}</h3>', // the template to use for page titles 'pageTitleTemplate'=>'{title} | {appName}', // the application layout to use with the cms 'appLayout'=>'application.views.layouts.main', // the name of the error flash message categories 'flashError'=>'error', 'flashInfo'=>'info', 'flashSuccess'=>'success', 'flashWarning'=>'warning', ),
Please note that this is the component configuration, NOT the module.
Pages are created by linking to them. To create a page add the following to one of your views:
Yii::app()->cms->createUrl('foo');
What the above code does it creates a node with the name 'foo' (if it doesn't already exist) and returns the URL to that node.
You can also set the following page properties: URL, page title, meta title, meta description, meta keywords.
Blocks are used for displaying Cms content within views and they can be created using the CmsBlock widget. To add a block, add the following code to one of your views:
$this->widget('cms.widgets.CmsBlock',array('name'=>'bar'))
If you have permissions to update Cms content an 'Update' link will be displayed below the content. Nodes have a set of properties that can be specified per language:
Please note that the page properties are only used with pages.
It is possible to create relations between nodes by setting the parent. This will help you organize your content and it will also automatically set the correct breadcrumbs.
You can use various tags within the body-field:
Please note that you cannot render inline nodes using the block widget.
NordCms comes with a theme that can be used with my Bootstrap extension.
To enable the bootstrap theme you first need to download and setup Bootstrap. When you have Bootstrap up and running you need to copy the files in themes/bootstrap/views to you themes/views folder. If you're not familiar with Yii's theming, read more about it here.
Stay tuned for the release!
Total 16 comments
Please Fix the Demo -- Thank you!
Demo not working :-(
I want to add this into a node {{nodeFile:pathtoview}} which would simply render a view file as part of the nodes render I'm wondering if maybe someone had this running ?
Hi Guys Thanks for the great module , it's promissing I was trying to play with internationalisation but as I change locale, the content disapears? it only works when local is empty I set up my 2 languages in the components configs is there something else to set up ? The Admin tool give the Languages to ttranslate which is fine but the front end reacts strangely I noticed the module stops working if sourcemessage and language parameters are used in the config file
could you show us how to use localisation for Node or widget Rendering ? in your demo I see http://www.cniska.net/cmsdemo/index.php/languages/default/changeLanguage/language/sw is this a language module ? self Answer : The module uses Yii::app()->language set up programaticaly or from the main config 'language' => 'en_us' The Module will then render the content localised to the active language
Yes it definitely would but it's not that simple. Do you have any suggestion on how to achieve this?
The Controller class is not a part of Yii, it's just a class generated by the webapp command. Not everyone uses that command so you cannot rely on that the class actually exists in every application.
... to have custom URLs (not page/xxxx) and a good menu manager.
Shouldn't the CmsController extends Controller and not CController for it to include changes to the Controller one may have made - for instance doing stuff on init?
CmsController.php line 14
to
Great extention - thanks! :)
Thanks for noticing this issue. I've fixed this and it will be included in the next release.
Hi Chris,
First of all Thanks for this very usefull module.
I uncounted a little bug when using the CmsBlock widget inside an other module. The 'update' link was pointing to /myModule/cms/node/update instead of /cms/node/update
I fixed this by changing line 7 in widgets\views\block.php from
to
Regards,
Rutger
I know this is not the right place to say this but I would like to congratulate you and to forward my gratitude for such amazing contribution Chris. Bootstrap, is one of the great new things on the Yii extension repository.
Not as far as I know, but improving the interface for attaching files to nodes is on my TODO list.
Cool extension!Is there an image uploader plugin for the MarkItUp editor to use instead of just links for images?
Nice extension! And since it's from the bootstrap widget's author chances are great that this extension gets even more popular!
There is also a quite similar lightweight cms project by me:
http://code.google.com/p/yay-cms
I could imagine merging all features of my cms into yours and abondoning mine. One good, lightweight cms is enough for the yii community ;)
keep up the good work!
You're right. BootTabs is a new Bootstrap widget. I will update Bootstrap shortly to include this widget. I apologize for the inconvenience.
EDIT: Bootstrap has now been updated. Please use version 0.9.6 or newer together with this extension.
Alias "ext.bootstrap.widgets.BootTabs" is invalid. Make sure it points to an existing PHP file. The file does not exist in the bootstrap extension, but:
in the update view.
Leave a comment
Please login to leave your comment.