PhpGt / WebEngine

Minimalistic, ergonomic PHP toolkit.
https://www.php.gt/webengine
MIT License
26 stars 6 forks source link

Dynamic pages: add class to body for each dynamic path part #640

Open g105b opened 10 months ago

g105b commented 10 months ago

For example, on URL /shop/computers/apple/macbook-pro

There can be multiple dynamic path parts: page/shop/@shop-area/@brand/@item.html

Currently, the body gets the following classes:

It would also be good to see the following classes, or something similar, so the individual dynamic pages can be referenced in CSS where appropriate:

g105b commented 10 months ago

Can be implemented here: https://github.com/PhpGt/WebEngine/blob/64daaae7a9f6dec9f9935006c2ae930d76e0097a/src/Middleware/RequestHandler.php#L202-L213