ExpressionEngine-User-Guide icon indicating copy to clipboard operation
ExpressionEngine-User-Guide copied to clipboard

Add {switch} example in Fluid Field's Grid Example

Open bsrweb opened this issue 6 years ago • 3 comments

Suggested Change Add a single-line example of a {switch} statement inside a Fluid Field's Grid Field code example.

Reasoning The syntax is a little different when a Grid Field is inside a Fluid Field loop: {content:switch='odd|even'] as opposed to a stand-along Grid Field: {grid_field_name:switch='odd|even'}.

Additional context Or maybe it's just me. When I first ran into this, I tried {content}{grid_field:switch}{/content} , then {content:grid_field:switch}, and then after a process of elimination, got the {switch} to work.

bsrweb avatar Dec 18 '18 00:12 bsrweb

Good idea, @bsrweb! Want to open a pull request with your suggested changes?

derekjones avatar Dec 18 '18 17:12 derekjones

Yes, I'd be happy to contribute. I just need to figure out how Docker works first.

bsrweb avatar Dec 18 '18 18:12 bsrweb

Yes, I'd be happy to contribute. I just need to figure out how Docker works first.

We've abstracted a lot of that way, via the eetools command line tool, so if you install Docker Desktop and follow the readme instructions in this repo, you should be good to go! If you're on Windows 10, I think it's Bash shell should still work with it? But I've not personally tested it.

derekjones avatar Dec 18 '18 19:12 derekjones