Quick question: why sometimes `content.` and other times it's `view.`

Whenever I’m developing (NodeJS), depending on the page, I have either content. bindings or view. bindings.

It is probably related to which layout page I’ve included, what is happening behind the scenes?

On one content page, using console: image

Then on another one:
image

On the pages where it’s view, does the content View node on the layout page have an id?
image

1 Like

It did not.

Just added the id content and that seems to work. Mystery solved :slight_smile:

It’s nice to have it consistent everywhere

1 Like

@bpj making sure each layout has the id ‘content’ and then ‘find + replace’ across all content pages should keep everything functional right?

Or am I missing something…
I see there’s so many bindings like this, would hate to break my entire app. (Don’t have extensive testing set up yet :frowning: )

Just don’t change the default view ID, which is used on your layout page if you want to access it like dmx.app.data.content.

Should be fine. I would suggest that you make it find "view. for the replacement (including the quotation mark) just to rule out where the word view might be part of a word or other binding. The dot on the end makes sure it is part of a binding phrase rather than an id itself

1 Like

Ah okay thanks, then I must’ve done that ages ago and never realised. But still use that layout regularly

Thank you :smiley:
That would not catch everything though, but I got VScode to help me replace carefully image

Ah. Didn’t realise you bound some with braces…

Love my braces

:grin: