You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all! Just getting started with Discussions. With version 3 around the corner, I am curious if anyone is using the DirectoryHandler for asset discovery?
The original concept came from the CodeIgniter 3 version of this module where all "discovery" was based on the filesystem. Now with PSR-4 and the framework's Autoloader I find filesystem discovery rigid and unappealing. The initial release of version 3 will not include directory discovery, but I'm looking for feedback here on how reliant users are on it.
If you have no idea what I am talking about, DirectoryHandler let's you map assets to your routes. So if your project looked like this:
Then a route of foo/bar would automatically load the root assets (styles.css and script.js) whereas users/index would load root assets plus the matched directory assets (users/index.js) and users/show/42 would include all the above plus users/show/color.css. Hopefully you get the idea.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi all! Just getting started with Discussions. With version 3 around the corner, I am curious if anyone is using the
DirectoryHandler
for asset discovery?The original concept came from the CodeIgniter 3 version of this module where all "discovery" was based on the filesystem. Now with PSR-4 and the framework's Autoloader I find filesystem discovery rigid and unappealing. The initial release of version 3 will not include directory discovery, but I'm looking for feedback here on how reliant users are on it.
If you have no idea what I am talking about,
DirectoryHandler
let's you map assets to your routes. So if your project looked like this:Then a route of
foo/bar
would automatically load the root assets (styles.css and script.js) whereasusers/index
would load root assets plus the matched directory assets (users/index.js) andusers/show/42
would include all the above plus users/show/color.css. Hopefully you get the idea.Beta Was this translation helpful? Give feedback.
All reactions