This task touches a behavior which is related to the pre-open source where the default way of making podlets was to write express.js routers which was bundled together into an application.
Due to this being the default at that time the pathname one set on the constructors in @podium/podlet and @podium/layout are not by default prepended to the path one set for content, manifest, fallback and the js and css routes. To prepended the pathname to these routes one need to set prefix as true when one are using one of the methods to get these values.
In other words, this returns /content when the .content() method is called:
Now as Podium is HTTP framework free and we do not encourage using Express Routers to bundle up Podlets into an application, having pathname not being prepended to the different paths is not intuitive and confusing. We should change the behavior so prefix is default trueinstead of false.
This task touches a behavior which is related to the pre-open source where the default way of making podlets was to write express.js routers which was bundled together into an application.
Due to this being the default at that time the
pathname
one set on the constructors in @podium/podlet and @podium/layout are not by default prepended to the path one set forcontent
,manifest
,fallback
and thejs
andcss
routes. To prepended thepathname
to these routes one need to setprefix
astrue
when one are using one of the methods to get these values.In other words, this returns
/content
when the.content()
method is called:This on the other hand returns
/foo/content
when the.content()
method is called:Now as Podium is HTTP framework free and we do not encourage using Express Routers to bundle up Podlets into an application, having
pathname
not being prepended to the different paths is not intuitive and confusing. We should change the behavior soprefix
is defaulttrue
instead offalse
.