view-helpers Questions
2
I have an MVC4 project that I am trying to create a helper for. I have added a folder called "App_Code", and in that folder I added a file called MyHelpers.cshtml. Here are the entire contents of t...
Saucier asked 6/6, 2013 at 2:8
3
Solved
class My_View_Helper_Gender extends Zend_View_Helper_Abstract
{
public function Gender()
{
//
}
}
"The class method (Gender()) must be named identically to the concliding part
of your class ...
Quesenberry asked 13/5, 2011 at 12:36
2
Solved
I wrote a form view helper, that extends the Zend\Form\View\Helper\FormMultiCheckbox and overwrites its renderOptions(...) method:
<?php
namespace MyNamespace\Form\View\Helper;
use Zend\Form\V...
Zante asked 10/4, 2013 at 21:31
2
Solved
In ZF1 we use partial in layout.phtml file something like that
$this->partial('header.phtml', array('vr' => 'zf2'));
How we can do the same in ZF2?
Redfish asked 29/8, 2012 at 14:19
2
Solved
I am trying to create a simple service in zf2 which I can access using in viewhelper
Step1. I have craeted a class in src/Application/Service/Service1.php as follow
namespace Application\Service;...
Sex asked 24/9, 2012 at 9:48
1
Solved
I wrote a partial which I want to use in several modules. I thought the best way would be to put it into my custom library.
But unfortunately I couldn't figure out a way to include this partial wi...
Whiles asked 21/12, 2012 at 13:46
5
Solved
I begin with ZF (1.9.7), and I want to use View Helpers from a library shared between all my projects. But I can't find how to add it directory to the helpers path. My herpers works fines when I pu...
Jaeger asked 25/2, 2010 at 16:15
1
Solved
Is there a way to create a view helper file that will be available to all views in a namespace? Like application_helper.rb, but only working for a given namespace.
Specifically, I have a namespace...
Paraboloid asked 27/7, 2011 at 20:4
3
Solved
Currently in the process of converting a website from its previous templating to Angular. In the previous templating process we were using we were able to call helper methods to display data correc...
Brittaneybrittani asked 17/9, 2012 at 20:31
5
Solved
I have a controller that is called with AJAX (sends JSON data), so I don't use a view.
I need to use a personnal view helper to format my data, but in my controller.
Is that possible ?
Or maybe ...
Keikokeil asked 8/3, 2010 at 12:59
1
Solved
When calling a function in my views/helpers/ file, from my script inside views/scripts/ , i get this error:
Message: Plugin by name 'SetBlnCompany' was not found in the registry;
used paths: My...
Jegar asked 2/3, 2012 at 17:8
1
Solved
I have too much text utility methods, like MakeShortText(string text, int length), RemoveTags(string text), TimeAgo(DateTime date) and other.
I want to access them from separate helper like in next...
Kunstlied asked 5/2, 2012 at 10:57
4
Solved
i am making a ecommerce application in which the categories are visible in side bar on all pages. i wrote a method in application controller
def categories
@categories = Category.all
end
but h...
Sallie asked 9/1, 2012 at 13:7
3
Solved
I have a class method in my model, and I need to access a method from one of my view helpers. Currently I am including include TalkHelper, but I still get a NoMethodError.
Johnnie asked 18/9, 2011 at 23:8
1
Solved
I'm trying to do the following:
module ApplicationHelper
class PModuleHelper
include ActionView::Helpers::TagHelper
def heading(head = "", &block)
content = block_given? ? capture(&bl...
Impassioned asked 27/8, 2011 at 17:27
2
Solved
Possible Duplicate:
Access a view helper for a model in rails
I know this is probably not something I should do often, but I want to use a helper within a model.
I'm generating a sp...
Pollux asked 25/7, 2011 at 18:22
4
I have a couple of block helpers, here's a simple example of what I'm doing:
def wrap_foo foo, &block
data = capture(&block)
content = "
<div class=\"foo\" id=\"#{foo}\">
#{data...
Lilley asked 4/12, 2009 at 23:40
2
Solved
I want to provide csv links in a view and I placed the csv generating code in ApplicationHelper. However I'm getting this error:
undefined method `send_data' for #<#<Class:0x0000010151c708&g...
Manoeuvre asked 12/5, 2011 at 23:37
1
Solved
In an action helper, I can get request using $this->getRequest();
Anything similar for a view helper?
Plead asked 7/4, 2011 at 11:25
1
Solved
I'm creating a simple CRUD for adding links to a category. Each category has an id. I have a view that lists all the links for a certain category. In that view I have a link to the add-form which i...
Iterate asked 18/11, 2010 at 13:35
1
Solved
When using the Url view helper to build links, if the current page has parameters in the url, the url generated by the Url view helper will contains parameters as well.
For instance in the page /c...
Connivance asked 14/6, 2009 at 20:47
© 2022 - 2024 — McMap. All rights reserved.