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
Is your feature request related to a problem? Please describe.
The core issue is described in #1434 - that issue provides a workaround but does not opt to fix it in Timber itself for performance reasons:
Now, I think we won’t change Timber to work around that. We would have to prepare all the data for posts in advance, but that would be a performance hit. The way it works now is that we fetch some of the data only when needed.
I think that's perfectly reasonable and valid, but I suspect it's possible to do this transparently and lazily.
Describe the solution you’d like
First, in Post::init(), we could detect that we're in multisite and store the site info:
Later, when we look up the permalink or similar functionality, we can detect that we're doing something site-dependent and make the switch transparently:
The Helper::on_multisite() method provides a generic wrapper function for doing arbitrary site-dependent stuff. Note that if we're not a multisite install, there is virtually no overhead.
Other site-dependent behavior can be implemented as needed.
Describe alternatives you’ve considered
Just not doing this, and providing good multisite docs. :)
Additional context
There is an open issue for creating a multisite guide here: #2207
The text was updated successfully, but these errors were encountered:
Agreed! We're doing a ton more Multisite work at our company. Having this handled in a really robust way would be a 🌟 to a lot of things we're actively doing (and then being like "wait, how come this is acting all funky????")
Rad! I haven't done much multisite dev at all, but I will need to as part of my next big client project. I definitely could use some help identifying the funky parts!
Is your feature request related to a problem? Please describe.
The core issue is described in #1434 - that issue provides a workaround but does not opt to fix it in Timber itself for performance reasons:
I think that's perfectly reasonable and valid, but I suspect it's possible to do this transparently and lazily.
Describe the solution you’d like
First, in
Post::init()
, we could detect that we're in multisite and store the site info:Later, when we look up the permalink or similar functionality, we can detect that we're doing something site-dependent and make the switch transparently:
The
Helper::on_multisite()
method provides a generic wrapper function for doing arbitrary site-dependent stuff. Note that if we're not a multisite install, there is virtually no overhead.Other site-dependent behavior can be implemented as needed.
Describe alternatives you’ve considered
Just not doing this, and providing good multisite docs. :)
Additional context
There is an open issue for creating a multisite guide here: #2207
The text was updated successfully, but these errors were encountered: