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 7804913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:03:53+00:00 2026-06-02T02:03:53+00:00

Using following controller: class mydvbController extends Zend_Controller_Action { public function indexAction() { } public

  • 0

Using following controller:

class mydvbController extends Zend_Controller_Action
{
    public function indexAction()
    {

    }

    public function careerAction()
    {

    }

    public function naviAction()
    {

    }
}

And following view scripts – index.phtml:

<?php echo $this->action('navi', 'mydvb'); ?>
Some stuff.....

and career.phtml:

<?php echo $this->action('navi', 'mydvb'); ?>
Some other stuff.....

I would like to get the name of the action in naviAction(), depending on which action called the action view helper (in my example index or career). There is of course the possibiliy to pass it in parameter, like this:

    <?php echo $this->action('navi', 'mydvb', null, array('actionName' => $this->naviAction)); ?>

But doing this that way means I have to pass the action name from every action to its view and from the view as a parameter to the action view helper. I wonder if there is simplier way to get the name of the action from inside the action view helper.

  • 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-06-02T02:03:54+00:00Added an answer on June 2, 2026 at 2:03 am

    Wouldn’t it be easier in your case to just get the action name from the request?

    $front = Zend_Controller_Front::getInstance();
    $actionName = $front->getRequest()->getActionName();
    echo $actionName;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using java with spring3 i have following controller's service method @Override public
I have the following controller and view. It is listing the values correctly using
I have the following code: public abstract class BaseController : Controller { public IUserService
Consider the following model and controller: public class SimpleModel { [Required(ErrorMessage=Email Address is required.)]
I am using the following query in controller of codeigniter. $u -> where('us_email_id', $username);
I'm facing following problem actually: I'm using Spring with jQuery. I have Controller: @Controller
I am using Codeigniter message library. In my controller I have the following code
i have created the folloiwng view model class public class viewmodelclass { public IEnumerable<Question>
I want to use MEF with asp.net mvc. I wrote following controller factory: public
I have the following code in my controller: class PagesController < Spree::BaseController before_filter {

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.