whitecube / nova-flexible-content

Flexible Content & Repeater Fields for Laravel Nova
MIT License
789 stars 228 forks source link

Default Layout instance has no fields when outputting #361

Closed johnpuddephatt closed 2 years ago

johnpuddephatt commented 2 years ago

In my own custom Layout classes I can define and access fields as expected but any layouts using the default Whitecube\NovaFlexibleContent\Layouts\Layout class have no fields.

In my views I can access their name with $layout->name() as expected, but $layout->fields() is empty.

Is this behaviour expected? I assumed the default Layout class would include fields and their values and that custom Layout classes were for more advanced behaviour.

toonvandenbos commented 2 years ago

Hi @johnpuddephatt, could you give an example to illustrate what you mean ? Thanks.

johnpuddephatt commented 2 years ago

Sorry this issue was based on a misunderstanding on my part. Will close this issue.

I think I understand the package much better now. The package and documentation are both great but the learning curve is quite steep at first! Thanks for your work on this, it's really powerful.

holyboly commented 1 year ago

Dude, where is the *** solution? Nobody gives a fuck about other people after solving their issues... -.-

voidgraphics commented 1 year ago

@holyboly if you have questions please be at least somewhat polite, thanks

holyboly commented 1 year ago

@voidgraphics you are correct sir, my bad, I just working for hours on this problem now and being just a little bit frustrated that someone solved this problem but did not leave any trace for me...

voidgraphics commented 1 year ago

That's classic. Always happens like that.

Perhaps @johnpuddephatt can kindly give you a clue as to what they found, and in the meantime I can only suggest you try what they tried: explore the source code, try to trace where the data is coming from, and maybe write us a more detailed description of what's not working for you; what you tried, what you expected to happen, what actually happened. There's a good chance that you will find your answer while writing that up, and if not, we'll have more information to guide you.