Skip to content

michaellehmkuhl/cakephp-cms-plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Steps for setting this up:

1) Add the contents table:
--
-- Table structure for table `contents`
--

CREATE TABLE IF NOT EXISTS `contents` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `parent_id` int(11) NOT NULL,
  `lft` int(11) NOT NULL,
  `rght` int(11) NOT NULL,
  `permalink` varchar(255) NOT NULL,
  `sort_order` varchar(50) NOT NULL,
  `controller` varchar(64) NOT NULL default '',
  `action` varchar(64) NOT NULL default '',
  `title` varchar(255) NOT NULL default '',
  `leadin` text NOT NULL,
  `content` text NOT NULL,
  `hidden` tinyint(1) NOT NULL default '0',
  `nl2br` tinyint(1) NOT NULL default '1',
  `created` datetime default NULL,
  `modified` datetime default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 ;


2) Set up routes
Router::connect('/contents/*', array('plugin' => 'cms', 'controller' => 'contents', 'action' => 'display'));

3) Move tiny_mce to app/webroot/js

You can also define MAX_DEPTH somewhere [like define('MAX_DEPTH', 4);] and that will control how man layers of subpages can be created. MAX_DEPTH of 1 will mean no subpages. Currently, this is in cms_app_controller.php but it could be just about anywhere, like core.php, for example, if you want to consolidate your configuration a little.

About

A CMS plugin for CakePHP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%