# \#laminas-view

**URL:** https://discourse.laminas.dev/tag/laminas-view/52.md

[Latest](https://discourse.laminas.dev/latest.md) · [Categories](https://discourse.laminas.dev/categories.md) · [Tags](https://discourse.laminas.dev/tags.md)

---

## [Call of appendStylesheet() or prependStylesheet()](https://discourse.laminas.dev/t/call-of-appendstylesheet-or-prependstylesheet/3943)

<div class="topic-metadata">

**Author:** [@mimmi20](https://discourse.laminas.dev/u/mimmi20)\
**Replies:** 1\
**Last updated:** [August 1, 2025, 9:33am UTC](https://discourse.laminas.dev/t/call-of-appendstylesheet-or-prependstylesheet/3943 "2025-08-01T09:33:01Z")

</div>

The appendStylesheet function is defined via a docblock. @method HeadLink appendStylesheet($href, $media = 'screen', $conditionalStylesheet = '', $extras = \[\]) I wanted to call the method with named parameters. $this-\>…

---

## [Twbs-helper-plugin: Reset row\_class or assign a different value instead of adding a new one](https://discourse.laminas.dev/t/twbs-helper-plugin-reset-row-class-or-assign-a-different-value-instead-of-adding-a-new-one/3762)

<div class="topic-metadata">

**Author:** [@oliver681](https://discourse.laminas.dev/u/oliver681)\
**Replies:** 3\
**Last updated:** [September 12, 2024, 11:53am UTC](https://discourse.laminas.dev/t/twbs-helper-plugin-reset-row-class-or-assign-a-different-value-instead-of-adding-a-new-one/3762 "2024-09-12T11:53:43Z")

</div>

I’m using the twbs-helper-plugin to render form elements. I can’t figure out how to define form elements without a spacing between them. By default, class="mb-3" is added to all divs containing an input element. Setting…

---

## [A plugin by the name "translate" was not found in the plugin manager](https://discourse.laminas.dev/t/a-plugin-by-the-name-translate-was-not-found-in-the-plugin-manager/3659)

<div class="topic-metadata">

**Author:** [@RaghavSingh](https://discourse.laminas.dev/u/RaghavSingh)\
**Replies:** 3\
**Last updated:** [April 2, 2024, 1:27am UTC](https://discourse.laminas.dev/t/a-plugin-by-the-name-translate-was-not-found-in-the-plugin-manager/3659 "2024-04-02T01:27:07Z")

</div>

Fatal error : Uncaught Laminas\\ServiceManager\\Exception\\ServiceNotFoundException: A plugin by the name “translate” was not found in the plugin manager Laminas\\View\\HelperPluginManager in /sandbox/connect-admin/vendor/lam…

---

## [How to set Translation Domain for all Viewhelpers](https://discourse.laminas.dev/t/how-to-set-translation-domain-for-all-viewhelpers/3588)

<div class="topic-metadata">

**Author:** [@mimmi20](https://discourse.laminas.dev/u/mimmi20)\
**Replies:** 1\
**Last updated:** [January 30, 2024, 10:54am UTC](https://discourse.laminas.dev/t/how-to-set-translation-domain-for-all-viewhelpers/3588 "2024-01-30T10:54:31Z")

</div>

We have an web application with the following configuration: we use lamias-i18n, laminas-view and laminas-form the app is customized for some partners, the language configuration is stored in the db and is loaded dynam…

---

## [How to get the name of the module, controller and action?](https://discourse.laminas.dev/t/how-to-get-the-name-of-the-module-controller-and-action/3541)

<div class="topic-metadata">

**Author:** [@lokotek](https://discourse.laminas.dev/u/lokotek)\
**Replies:** 7\
**Last updated:** [November 17, 2023, 2:04pm UTC](https://discourse.laminas.dev/t/how-to-get-the-name-of-the-module-controller-and-action/3541 "2023-11-17T14:04:49Z")

</div>

I’m usign the latest Laminas framework and I want to know how to get the name of the module, controller and action? I need those names in a view helper. Thanks in advance!

---

## [I’m looking for examples of ag-grid being used with laminas](https://discourse.laminas.dev/t/i-m-looking-for-examples-of-ag-grid-being-used-with-laminas/3475)

<div class="topic-metadata">

**Author:** [@Mark\_Manning](https://discourse.laminas.dev/u/Mark_Manning)\
**Replies:** 1\
**Last updated:** [September 21, 2023, 10:49am UTC](https://discourse.laminas.dev/t/i-m-looking-for-examples-of-ag-grid-being-used-with-laminas/3475 "2023-09-21T10:49:26Z")

</div>

It appears it should be possible to create a data grid in a laminas project by using helpers to to add js and css for ag-grid to the view phtml layout or index. So far only getting blank pages

---

## [Use different layout for each module](https://discourse.laminas.dev/t/use-different-layout-for-each-module/3300)

<div class="topic-metadata">

**Author:** [@Super0Yt](https://discourse.laminas.dev/u/Super0Yt)\
**Replies:** 10\
**Last updated:** [April 21, 2023, 3:54pm UTC](https://discourse.laminas.dev/t/use-different-layout-for-each-module/3300 "2023-04-21T15:54:18Z")

</div>

Is it possible to set up a layout for each module? I am following an Oleg Krivtsov’s tutorial, but I don’t understand how to create a layout for each module. I’m struggling with the use of partial, helper, and listener …

---

## [ViewEvent Listener](https://discourse.laminas.dev/t/viewevent-listener/3098)

<div class="topic-metadata">

**Author:** [@makxk](https://discourse.laminas.dev/u/makxk)\
**Replies:** 3\
**Last updated:** [November 10, 2022, 12:07pm UTC](https://discourse.laminas.dev/t/viewevent-listener/3098 "2022-11-10T12:07:48Z")

</div>

Hi everyone! I have been trying to register a Listener for ViewEvent::EVENT\_RENDERER\_POST, and I have hit a wall. This is what I have: PostRendererListener: \<?php namespace Application\\Listener; use Laminas\\EventM…

---

## [Can headscript view helper data be re-initialized?](https://discourse.laminas.dev/t/can-headscript-view-helper-data-be-re-initialized/3033)

<div class="topic-metadata">

**Author:** [@ALTAMASH80](https://discourse.laminas.dev/u/ALTAMASH80)\
**Replies:** 2\
**Last updated:** [September 2, 2022, 4:40pm UTC](https://discourse.laminas.dev/t/can-headscript-view-helper-data-be-re-initialized/3033 "2022-09-02T16:40:14Z")

</div>

Hi, I wanted to know if there is a possibility to reset the data again for the $view-\>headScript(). The reason for asking is that I want to use a new version of Javascript in the layout. But I can’t do that for the whole…

---

## [Laminas showing Renderer Error](https://discourse.laminas.dev/t/laminas-showing-renderer-error/3015)

<div class="topic-metadata">

**Author:** [@rajath](https://discourse.laminas.dev/u/rajath)\
**Replies:** 8\
**Last updated:** [August 29, 2022, 3:19pm UTC](https://discourse.laminas.dev/t/laminas-showing-renderer-error/3015 "2022-08-29T15:19:38Z")

</div>

Hi, i am trying to user renderer functionality and getting path error Laminas\\View\\Renderer\\PhpRenderer::render: Unable to render template “application/history/subviewdetails”; resolver could not resolve to a file F…

---

## [Partial in Mezzio](https://discourse.laminas.dev/t/partial-in-mezzio/2903)

<div class="topic-metadata">

**Author:** [@Kriss\_Kals](https://discourse.laminas.dev/u/Kriss_Kals)\
**Replies:** 2\
**Last updated:** [June 1, 2022, 8:44pm UTC](https://discourse.laminas.dev/t/partial-in-mezzio/2903 "2022-06-01T20:44:30Z")

</div>

Hello, normally in Laminas MVC I use layout helper partial in my templates to separate the header or footer code. However in mezzio this option doesn’t work. How can I add some code from separate .phtml files to the mai…

---

## [\<meta name="robots" content="noindex, nofollow"\>](https://discourse.laminas.dev/t/meta-name-robots-content-noindex-nofollow/2832)

<div class="topic-metadata">

**Author:** [@Engr.Naeem\_ullah](https://discourse.laminas.dev/u/Engr.Naeem_ullah)\
**Replies:** 1\
**Last updated:** [March 25, 2022, 8:08am UTC](https://discourse.laminas.dev/t/meta-name-robots-content-noindex-nofollow/2832 "2022-03-25T08:08:34Z")

</div>

Hi every one i have a website developed in zend framework and this website is developed by another developer my website shows but i checked in the source code there is no robots.how i can resolve this problem

---

## ['No base path provided' Error in Mezzio Skeleton](https://discourse.laminas.dev/t/no-base-path-provided-error-in-mezzio-skeleton/2725)

<div class="topic-metadata">

**Author:** [@vigcraig](https://discourse.laminas.dev/u/vigcraig)\
**Replies:** 5\
**Last updated:** [January 24, 2022, 9:28am UTC](https://discourse.laminas.dev/t/no-base-path-provided-error-in-mezzio-skeleton/2725 "2022-01-24T09:28:44Z")

</div>

Hi, When I try to use \<?= $this-\>basePath();?\> in a template in mezzio, I get the ‘No base path provided’ error: I am using laminas view, and this is a basic install of the mezzio skeleton. Should this work? Insta…

---

## [Create an URL with Hostname type and relative URL](https://discourse.laminas.dev/t/create-an-url-with-hostname-type-and-relative-url/2589)

<div class="topic-metadata">

**Author:** [@JulienH](https://discourse.laminas.dev/u/JulienH)\
**Replies:** 1\
**Last updated:** [November 8, 2021, 7:49am UTC](https://discourse.laminas.dev/t/create-an-url-with-hostname-type-and-relative-url/2589 "2021-11-08T07:49:12Z")

</div>

Hello, I would like to create an URL with $this-\>url() in my view and using a Hostname type in my module.config.php file: 'front' =\> \[ 'type' =\> Hostname::class, 'options' =\> \[ …

---

## [Laminas Diactoros JsonResponse](https://discourse.laminas.dev/t/laminas-diactoros-jsonresponse/2535)

<div class="topic-metadata">

**Author:** [@mwcode](https://discourse.laminas.dev/u/mwcode)\
**Replies:** 3\
**Last updated:** [October 8, 2021, 1:07pm UTC](https://discourse.laminas.dev/t/laminas-diactoros-jsonresponse/2535 "2021-10-08T13:07:37Z")

</div>

Hi, i have create a very simple Action for a test. I send a Ajax request and want a JsonResponse. Every time i use the Laminat Diactoros Json Response function i get a the default layout HTML Template back. public fu…

---

## [Laminas-mvc not using layout, $this-\>headLink() seems can not append stylesheet](https://discourse.laminas.dev/t/laminas-mvc-not-using-layout-this-headlink-seems-can-not-append-stylesheet/2482)

<div class="topic-metadata">

**Author:** [@jobsfan](https://discourse.laminas.dev/u/jobsfan)\
**Replies:** 12\
**Last updated:** [September 2, 2021, 7:21am UTC](https://discourse.laminas.dev/t/laminas-mvc-not-using-layout-this-headlink-seems-can-not-append-stylesheet/2482 "2021-09-02T07:21:31Z")

</div>

My action, not using a layout: public function addAction() { /\*\* @var ServerForm $form \*/ $form = $this-\>formElementManager-\>get(ServerForm::class); $request = $this-\>getRequest(); …

---

## [Stand alone view url helper when cli is used](https://discourse.laminas.dev/t/stand-alone-view-url-helper-when-cli-is-used/2459)

<div class="topic-metadata">

**Author:** [@ivel](https://discourse.laminas.dev/u/ivel)\
**Replies:** 6\
**Last updated:** [August 30, 2021, 8:24am UTC](https://discourse.laminas.dev/t/stand-alone-view-url-helper-when-cli-is-used/2459 "2021-08-30T08:24:59Z")

</div>

Hi all, I am trying to migrate from laminas-console to laminas-cli, but the following issue appeared: I am using cron to initiate regular tasks like sending reminding email to users (using my Mailer class). In those em…

---

## [Store header and footer in separate phtml files](https://discourse.laminas.dev/t/store-header-and-footer-in-separate-phtml-files/2339)

<div class="topic-metadata">

**Author:** [@WDSB](https://discourse.laminas.dev/u/WDSB)\
**Replies:** 4\
**Last updated:** [June 29, 2021, 1:47pm UTC](https://discourse.laminas.dev/t/store-header-and-footer-in-separate-phtml-files/2339 "2021-06-29T13:47:36Z")

</div>

I would like to store the header and footer in their own phtml files and include them in the main page. It was possible under Zend. how can one accomplish there under laminas

---

## [How can I use page information from the navigation in the view?](https://discourse.laminas.dev/t/how-can-i-use-page-information-from-the-navigation-in-the-view/2321)

<div class="topic-metadata">

**Author:** [@smj320](https://discourse.laminas.dev/u/smj320)\
**Replies:** 2\
**Last updated:** [May 28, 2021, 7:12am UTC](https://discourse.laminas.dev/t/how-can-i-use-page-information-from-the-navigation-in-the-view/2321 "2021-05-28T07:12:37Z")

</div>

Hi. I want to use an active page’s information from view. I use this code in the “every” view for it now. $container = $this-\>navigation("default")-\>getContainer(); $it = new RecursiveIteratorIterator($container, Recu…

---

## [Specific path to view template with condition](https://discourse.laminas.dev/t/specific-path-to-view-template-with-condition/2207)

<div class="topic-metadata">

**Author:** [@kliker02](https://discourse.laminas.dev/u/kliker02)\
**Replies:** 1\
**Last updated:** [March 26, 2021, 9:28am UTC](https://discourse.laminas.dev/t/specific-path-to-view-template-with-condition/2207 "2021-03-26T09:28:03Z")

</div>

Hello! I have in my component 3 users roles: admin, client, guest. I want that template is displayed depending on user role: so if user have ‘admin’ role, than template view path will following: view/admin/module/co…

---

## [InlineScript and CSP nonce attribute](https://discourse.laminas.dev/t/inlinescript-and-csp-nonce-attribute/2075)

<div class="topic-metadata">

**Author:** [@Kriss\_Kals](https://discourse.laminas.dev/u/Kriss_Kals)\
**Replies:** 3\
**Last updated:** [January 28, 2021, 9:10pm UTC](https://discourse.laminas.dev/t/inlinescript-and-csp-nonce-attribute/2075 "2021-01-28T21:10:42Z")

</div>

Hi, how I can add attribute nonce to InlineScript helper? Best regards

---

## [Check if exists Name, HttpEquiv and Property in HeadMeta](https://discourse.laminas.dev/t/check-if-exists-name-httpequiv-and-property-in-headmeta/2072)

<div class="topic-metadata">

**Author:** [@DiegoBittencourt](https://discourse.laminas.dev/u/DiegoBittencourt)\
**Replies:** 2\
**Last updated:** [January 27, 2021, 11:31am UTC](https://discourse.laminas.dev/t/check-if-exists-name-httpequiv-and-property-in-headmeta/2072 "2021-01-27T11:31:15Z")

</div>

Hello I have a situation in HeadMeta where I would like to test if a meta tag exists and then insert a value the same, for example: layout.phtml: $this-\>headMeta()-\>setName('description', 'description website default')…

---

## [Class 'Laminas\\View\\Strategy\\ PhpRendererStrategy ' not found](https://discourse.laminas.dev/t/class-laminas-view-strategy-phprendererstrategy-not-found/2046)

<div class="topic-metadata">

**Author:** [@decoder](https://discourse.laminas.dev/u/decoder)\
**Replies:** 2\
**Last updated:** [January 12, 2021, 3:16pm UTC](https://discourse.laminas.dev/t/class-laminas-view-strategy-phprendererstrategy-not-found/2046 "2021-01-12T15:16:23Z")

</div>

I am getting this error. Please help me, how can resolve this. Warning: Class ‘Laminas\\View\\Strategy\\PhpRendererStrategy’ not found in F:\\xampp\\htdocs\\myproject\\vendor\\laminas\\laminas-zendframework-bridge\\src\\Autoloade…

---

## [\[RFC\] Helper and/or class to manipulate and print HTML element attributes](https://discourse.laminas.dev/t/rfc-helper-and-or-class-to-manipulate-and-print-html-element-attributes/1888)

<div class="topic-metadata">

**Author:** [@aleksip](https://discourse.laminas.dev/u/aleksip)\
**Replies:** 1\
**Last updated:** [October 14, 2020, 12:09pm UTC](https://discourse.laminas.dev/t/rfc-helper-and-or-class-to-manipulate-and-print-html-element-attributes/1888 "2020-10-14T12:09:43Z")

</div>

I have moved over from Drupal to Laminas, and a lot of my work continues to involve writing HTML templates. Drupal has a hugely useful Attribute class for manipulating and printing out the attributes of an HTML element: h…

---

## [ViewModel setTerminal not working properly](https://discourse.laminas.dev/t/viewmodel-setterminal-not-working-properly/1787)

<div class="topic-metadata">

**Author:** [@mhaendler](https://discourse.laminas.dev/u/mhaendler)\
**Replies:** 6\
**Last updated:** [August 19, 2020, 7:31am UTC](https://discourse.laminas.dev/t/viewmodel-setterminal-not-working-properly/1787 "2020-08-19T07:31:58Z")

</div>

Hey Guys, i got a strange issue which i am not sure why it does occur. So basicly i got this code in my controller: $view = new ViewModel(); $view-\>setTemplate('myportal/box/boxtype'); return $view; Everything gets di…

---

## [How to remove index.php from URL and set view variables in 404 template](https://discourse.laminas.dev/t/how-to-remove-index-php-from-url-and-set-view-variables-in-404-template/1542)

<div class="topic-metadata">

**Author:** [@CDW](https://discourse.laminas.dev/u/CDW)\
**Replies:** 0\
**Last updated:** [April 20, 2020, 2:38pm UTC](https://discourse.laminas.dev/t/how-to-remove-index-php-from-url-and-set-view-variables-in-404-template/1542 "2020-04-20T14:38:37Z")

</div>

Hi, in my application I have the if i visit my page of http://nanocord.io/ or http://nanocord.io/index.php/ they are the same exact thing. I would like what is the best way in the case that someone visits like this: http…

---

## [Variable issues](https://discourse.laminas.dev/t/variable-issues/1487)

<div class="topic-metadata">

**Author:** [@josiahking](https://discourse.laminas.dev/u/josiahking)\
**Replies:** 1\
**Last updated:** [March 30, 2020, 9:29am UTC](https://discourse.laminas.dev/t/variable-issues/1487 "2020-03-30T09:29:34Z")

</div>

Hello, How can i pass variable around in laminas-mvc? I tried to use the normal viewmodel approach but I am not able to get the variable in my layout, but if i set the variable via layout approach, i could get it in the…
