Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 992371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T06:15:26+00:00 2026-05-16T06:15:26+00:00

I can’t seem to find a method to call different controller in the same

  • 0

I can’t seem to find a method to call different controller in the same view. The closest thing I’ve found is $html->link(“Register User”,array(‘controller’ => ‘users’, ‘action’=>’register’)).

So I did the cakephp’s blog tutorial. I have a posts_controller.php, and now I want to add in a star rating system. I googled some stuff and got this nifty-already-been-done rating system you can download: http://www.reversefolds.com/articles/show/rating2

Now I have two controllers, rating_controller.php and post_controller.php.

My base route, ‘/’, is pointing to post controller’s index action. My post’s view.ctp is showing one blog entry, I want to add in the rating system within this view. And to use the rating I need to call the helper like so:

echo $rfRating->ratingBar($ratingInfo);

When I do this in post’s view.ctp file. It complains. I’ve tried messing around with var $helpers = array('blah') but it didn’t work, I just end up merging the rating controller in the post_controller, which I think is stupid. I can use the rating system for other stuff too.

So… I don’t know what to do. Actually that’s a lie, I think I two idea how to tackle this. But I need critiques and other solutions that my google skills have failed.

  1. Should I just implement the whole rating system into the app_controller.php instead? So that every controller inherit this rating system? Sounds stupid because I don’t think my user registration needs the rating system.

  2. I’ve googled up another solution, requestAction('blab'). I think what this enable me to do is… to call another controller within a controller. But this is frown upon cause it kills performance. And I don’t exactly know how to do this haha or if it works. I call the rating controller but what about its helper function? Maybe it’ll recognize it if I add a var $helpers = array(‘rating’);

Anyway, thank you all in advance for taking the time to read this. Please point me in the right direction.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T06:15:27+00:00Added an answer on May 16, 2026 at 6:15 am

    Have the ratings_controller extend the posts_controller.

    This gives you the ability to selectively decide which pages need the ratings module.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can't seem to figure out what's wrong with the simple getJSON call below. It's
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
Can anyone explain me what's going on? I use this method - (BOOL)shouldAutorotateToInterfaceOrientation:( UIInterfaceOrientation)interfaceOrientation
Can anyone help me trying to find out why this doesn't work. The brushes
Can't seem to get the Back Button to appear in a UINavigationController flow. I
Can anyone (maybe an XSL-fan?) help me find any advantages with handling presentation of
Can we change the HTML or its attributes of the selected part of the
Can not find scala.actors package in latest milestones, while it still presents in scaladocs:
Can find why i get this error can someone help? package Android.data; public class
Can someone please help me see what I've overlooked here? The thing is, these

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.