Custom layout for page 404 in cakephp 3.x - cakephp

I want to change default layout for 404 page in cakephp 3.x .I know I can change it from src/Templates/Error/error400.ctp file but what I want is to load css from my theme from plugins/Theme/webroot/ not from default webroot.
Can anyone help me with this please?

You can use plugin syntax for loading css file from plugin.
echo $this->Html->css('DebugKit.toolbar.css');
Source > Linking to CSS Files

Related

2sxc loading BS4 template on BS3 Xcillion Theme

I have a new install of DNN 9.8.1 and have installed 2sxc 11.11.04. I am trying to create Tailwind "tlw1" editions of the content-templates but was having issues where the BS4 templates were loading even though the tailwind theme I am using has a koi.json file defining "tlw1" as the default css framework.
Thinking I had configured something wrong, I setup a test. I added the content layout with the image|text view to a page with the Xcillion theme. I then added this remark #* Bootstrap 4 Template *# to the top of the BS4 template (added directly to the file using vs code) to make it easy to identify. Seeing Xcillion uses BS3, when I go to edit the template file, I expect the template from the ../BS3/Content folder to load. The editor however is loading the BS4 template from ../Content, not the BS3 template.
Do I not understand how koi is supposed to work, or is there possibly an issue with the koi implementation?
I figured it out. If you use the Edit Template button in the 2sxc content module, the 2sxc editor opens in a new tab and always loads the BS4 template, even though your theme is using BS3 or other framework. If you navigate to the BS3 folder (or other framework folder) through the file system, and edit the files directly with a code editor such as VS Code, the changes you make are displayed correctly as expected.

ext js error messages in console debug on startup (from css section)

any ideas why I am getting all these error messages. I am not doing ANY styling yet. Just whatever is included in standard startup.
Yes they are part of the Extjs theme your project is using.. I don't think this would cause any problem.
You can find the name of the theme in your app.json file and you can find the corresponding theme in your extjs library directory

How to include a js Library within a CakePHP Plugin

can anyone tell me how to include a js Library within a CakePHP Plugin ?
In the root app/ folder I can do it in the Config/assets.php but where do I include it in a Plugin ?
The Library which I want to include is located in /app/Plugin/MyModule/webtoor/js/lib/
You can use blocks for scripts and CSS files. More info here: http://book.cakephp.org/2.0/en/views.html#using-blocks-for-script-and-css-files
Short answer:
// in your view
$this->Html->script('/pluginName/js/lib/whatever', array('block' => 'scriptBottom'));
// in your layout
echo $this->fetch('scriptBottom');
This should do the trick.

How to use custom css in extjs app

In my Extjs app I have kept custom.css file in the resources folder of the root for testing and in the build- resources folder. And add the css path to two both index.html files(test and build). But whenever I make it to convert to build production, index.html file overwrites and custom.css file finds missing. Somewhat problematic it is. I know that this is because I add this file externally. But Is there any permanent solutions to fix this, without violating the Extjs app structure ??
You can add your custom styles via scss. There are several articles around the web about styling your ExtJS app.
http://docs.sencha.com/extjs/5.0.0/core_concepts/theming.html
http://www.rallydev.com/community/engineering/guide-custom-themes-extjs-4 [dead link]
If you only want to add your single custom css file - which i do not recommend - you can do things like that:
Include an existing CSS file in custom extjs theme
http://www.sencha.com/forum/showthread.php?270694-How-to-include-custom-components-CSS-in-build-CSS

Croogo Theme issue in localhost [Windows]

I am using Croogo CMS in my Cakephp website, its working fine in server and all linux machines but it’s not working properly in windows machine. Please find below issue what I am facing in my local host
PHP Version:5.3.13
Croogo Version: 1.4.3
OS: Windows 7 - 32 bit
Goal: I want to use my Cakephp default layout instead of croogo theme layout and css and js from croogo theme
Cakephp Layout location:
app/Views/Layouts/default.ctp
Croogo Theme Layout
Views/Themed/[MyTheme]
default.ctp
css[folder]
js[folder]
Now problem is css and images point to this directory theme/[MyTheme]/css/style.css. But this folder structure is not available, so I am getting below error
"NetworkError: 404 Not Found - http://localentrust.dev/theme/[MyTheme]/css/style.css"
Please guide me to solve this issue. Thanks!
probably u have permissions issues, there is no logical reason for your css to not be displayed, the other thing i see is that your default view is not under Layouts folder, and your js and css folders should be under webroot folder. greetings

Resources