Build Your Own CMS With ZF2 | Php | Namespace

December 30, 2016 | Author: Anonymous | Category: PHP
Share Embed


Short Description

The Zend Framework has a lot of changes so this is out-dated and I researched how to realize a new CMS controller.*./mod...

Description

Build your own CMS with ZF2 Zend Framework 2 tutorial provided by www.tutorial-portal.com

Copyright www.tutorial-portal.com User: thomas Online version: http://www.tutorial-portal.com/tutorial/52/buildyour-own-cms-with-zf2

1/6

www.tutorial-portal.com

I already wrote once a tutorial how to create your own CMS functionallity with the Zend Framework. The Zend Framework has a lot of changes so this is out-dated and I researched how to realize a new CMS controller. Here is it!

Prerequisites 1. Working Zend Framework 2 application (see http://framework.zend.com/manual/2.0/en/userguide/skeleton-application.html). 2. A concept of working with models. If you don't know how to load date from a database, read the tutorial here (see http://www.tutorial-portal.com/tutorial/show/id/49).

Database table Create a table for the pages in your mySQL database. Run this query against your database. CREATE TABLE page( id int(11) NOT NULL auto_increment, identifier varchar(255) NOT NULL, title varchar(255) NOT NULL, content text NOT NULL, PRIMARY KEY (id) );

Data For testing we need data. I give you one data for the page 'imprint'. Run this query against your database. INSERT INTO `page` (`id`, `identifier`, `title`, `content`) VALUES (NULL, 'imprint', 'Imprint', '[email protected] 5');

Application config Open your application's config file (/config/application.config.php) and add 'Page' to your modules.
View more...

Comments

Copyright © 2017 DATENPDF Inc.