Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // in my AppController
- public function beforeFilter() {
- $this->set('totalSubmissions', $this->getSubmissionCount());
- }
- public function getSubmissionCount() {
- $totalSubmissions = $this->Submission->find('count');
- return $totalSubmissions;
- }
- // in my app/views/elements/sidebar_categories.ctp (which is called in app/views/default.ctp)
- <?= $totalSubmissions; ?>
Add Comment
Please, Sign In to add comment