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

  • Home
  • SEARCH
  • 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 7738949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T08:23:54+00:00 2026-06-01T08:23:54+00:00

I am trying to simply use a custom view helper that is located in

  • 0

I am trying to simply use a custom view helper that is located in /library/my/view/helpers/friends.php

I have this in the application.ini:

resources.view.helperPath.My_View_Helper = "/my/view/helpers"

This is the helper class:

class My_View_Helper_Friends extends Zend_View_Helper_Abstract {
    public function friends() {
        $str = "hello world";
        return $str;
    }
}

This is in the view file:

<?php echo $this->friends(); ?>

I get an error on this line saying it can’t find the plugin in a path that it is already in.

The error:

Plugin by name ‘Friends’ was not found in the registry; used paths:
My_View_Helper_: /My/View/Helpers/ Zend_View_Helper_:
Zend/View/Helper/;C:/http/xampplite/htdocs/zf-tutorial/application/views\helpers/

Looks like its using the right path and the file is there. I don’t understand why it can’t find it?

  • 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-01T08:23:55+00:00Added an answer on June 1, 2026 at 8:23 am

    I believe the problem is that the incorrect path is being used.

    …used paths: My_View_Helper_: /My/View/Helpers/

    Note how the path is /My/View/Helpers. It is using an absolute path. The other issue is that the folder should be named Helper instead of helpers.

    Then change the config line in your application.ini to this:

    resources.view.helperPath.My_View_Helper = APPLICATION_PATH "/../library/my/view/helper"
    

    and make sure your class is called My_View_Helper_Friends and the file is named Friends.php. Case matters. The directory should really be called My/View/Helper with caps.

    EDIT: Assuming library is in your include_path, you could also use the line:

    resources.view.helperPath.My_View_Helper = "My/View/Helper"
    

    Notice how it doesn’t have the leading /. This will search all locations in your include_path for a folder My/View/Helper.

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

Sidebar

Related Questions

I have been trying to use one View for updating an object and all
I have created a custom UIView that I would like to use on multiple
I have a ListView that uses a custom layout that has 5 child View
I'm trying to simply use a vector within one of my classes. When trying
I'm trying to use Simple Savant within my application, to use SimpleDB I currently
I'm trying to use the simple modal jquery library on a page and the
I'm trying to use LogCat to debug a simple app that reads an XML
Ok, I am trying to create a custom view called CheckedRelativeLayout . It's purpose
I started learning drupal customization, and i'm trying to create a very simply custom
In the app, I'm struggling with I have a custom view. I cannot declare

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.