PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, January 17, 2022

[FIXED] CakePHP 3.x how to point the templates to a file inside a Plugin?

 January 17, 2022     cakephp, cakephp-3.0, plugins, themes     No comments   

Issue

According to http://book.cakephp.org/3.0/en/views/helpers/form.html#customizing-the-templates-formhelper-uses,

the way to point to a list of template containers, is to create a file inside config folder.

// In a View class
$this->loadHelper('Form', [
    'templates' => 'app_form',
]);

This would load the tags in config/app_form.php. This file should contain an array of templates indexed by name:

How do I do the same by pointing at a file inside a Plugin instead?


Solution

How do I do the same by pointing at a file inside a Plugin instead?

Guess as everywhere else in the framework? Dot notation: PluginName.app_form

If that is not working it should be added to the framework to be consistent.



Answered By - floriank
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing