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
e.g. site.host, site.path, and state.site.name are empty for this component URL http://localhost.dev.nymag.biz:3001/components/article/instances/pr-first.html
state and site are available to the template from this page URI http://localhost.dev.nymag.biz:3001/press/2015/04/first-page.html
Perhaps asking for a URL that would render the component with the site data; something like http://localhost.dev.nymag.biz:3001/press/components/article/instances/pr-first.html
The text was updated successfully, but these errors were encountered:
Things at /pages and /components have no site. They're shared between all sites. Therefore, there is no site.whatever. If you want site data in a component, and if you want to get it dynamically like that, then you have to save that site data to that specific component. However, whatever you're trying to do, I'd recommend restructuring it to be in the context of a component feature, rather than something specific to a site. Then the other users of that component can also use your new feature.
If it's just trying to get js or css to show up, nevermind. There's another solution that we're working on that might work for that.
Alternatively, there is a PR now (#120) that may solve your issue temporarily.
Also note: You never need to say state unless you're trying to refer to this. State was needed because some template languages don't have a concept of this, so we put it into state.
e.g.
site.host
,site.path
, andstate.site.name
are empty for this component URLhttp://localhost.dev.nymag.biz:3001/components/article/instances/pr-first.html
state
andsite
are available to the template from this page URIhttp://localhost.dev.nymag.biz:3001/press/2015/04/first-page.html
Perhaps asking for a URL that would render the component with the site data; something like
http://localhost.dev.nymag.biz:3001/press/components/article/instances/pr-first.html
The text was updated successfully, but these errors were encountered: