Closed dantleech closed 9 years ago
so for the menu example, we would have a map of "virtual paths" to repository paths, that in addition can be dynamic to support a multisite situation?
Yeah, @webmozart just added a CompositeRepository to Puli, so we can do the following:
$repo->mount('/menu', function () use ($manager) {
// $nestedRepo
return new PhpcrOdmRepository($manager, '/cms/site1/menus');
});
// so
$repo->get('/menu/main');
// is the same as
$phpcrOdmRepo->get('/cms/site1/menus/main');
Still some blanks to be filled in however, its interesting.
... however, its interesting.
indeed it is!
Will apply CSFixer and merge in the coming days.
Merged.
This bundle aims provides object resource location services based on Puli.
Note that I will break a component out of this bundle, but its just easier to do the initial development as a bundle.
Examples:
/routes
to/cms/routes
/routes
to/cms/<current site>/routes
./role/menu/main
to/cms/menus/main-menu
./cmf/routes/*/bar
The first example could use the existing CMF base route configuration to resolve paths.
The benefit of the next two examples would be most strongly felt in association with another component which would provide a context for the document resource resolution.
For example, a
Site
which is matched against the incoming hostname would provide the context with which to resolve the documents.Problems which this aims to solve:
Things it would make possible:
See: