Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Javascript and CSS include errors #69

Open
Movo-Burhan opened this issue Oct 18, 2020 · 1 comment
Open

Javascript and CSS include errors #69

Movo-Burhan opened this issue Oct 18, 2020 · 1 comment

Comments

@Movo-Burhan
Copy link

I am trying to create a router with the Path: localhost/user/login. Here is an example how I try to do it: $router->add('user/login', ['controller' => 'LoginController', 'action' => 'login']);
It also works but I get include errors from Javascript freamworks and CSS. See the picture.

image

Includes in the twig file:

... ...

If I only use e.g. "login" as path the frameworks are included.
$router->add('user/login', ['controller' => 'LoginController', 'action' => 'login']);

@daveh
Copy link
Owner

daveh commented Oct 19, 2020

The URLs for your included files need to be based on the path to the public folder - so for example if you have a file pubic/css/main.css, you would include it like this:

<link rel="stylesheet" href="/css/main.css">

If you have the framework in a subfolder, you need to include that too:

<link rel="stylesheet" href="/appmvc/css/main.css">

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants