I\'m planning to develop a web application which will have many static pages (about, help, contact, etc.) and other dynamic pages for the application.
Most of the ti
Use WordPress on the admin side for editing the textual content (and even menus). But use a custom CakePHP app to output that content.
CakePHP can read formatted content straight off the WordPress database tables (or a custom views). You need to define a new database connection and a new model (e.g. Post).
Here's a sample example implementation:
A new database connection in /app/database.php:
class DATABASE_CONFIG {
// ...
var $wp = array(
'driver' => 'mysql',
'persistent' => false,
'host' => 'localhost',
'login' => '',
'password' => '',
'database' => '',
'prefix' => 'wp_',
);
}
A new model in /app/models/post.php:
class Post extends AppModel {
var $primaryKey = 'ID';
// Could define relations
}
Any controller now can fetch the content, e.g.:
class XxxController extends AppController {
function index($postName) {
$this->set('post', $this->Post->findByPostName($postName));
}
}
And the view can simply output the HTML content of the post:
Here is a more elaborate example: http://code.google.com/p/cakephp-wordpress/.