0

I want to access admin-css:

echo $this->Html->css('adminStyle');
<link rel="stylesheet" href="/css/adminStyle.css" />

But I want this:

<link rel="stylesheet" href="/admin/css/adminStyle.css" />

Can I do it that way?

My webroot folder:

 - webroot
   - admin
     - css
     - img
     - js
   - css
   - img
   - js

2 Answers 2

1

You can use this echo $this->Html->css('/admin/css/adminStyle.css');

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks bro. :) You saved me from writing it => link rel="stylesheet" href="<?= $this->Url->build('/', true);?>admin/css/adminStyle.css" type="text/css"/
1

Update the cssBaseUrl setting in your config/app.php to point to the correct directory ( admin/css/ ).

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.