ObjectiveSubject / ccl

1 stars 0 forks source link

Create carousel/module helper #4

Closed davekellam closed 7 years ago

davekellam commented 7 years ago

@kpettinga do you have any thoughts on separation of content/display here? Happy to use the partial/components here. What makes more sense as a helper... returning a data array or structured html?

davekellam commented 7 years ago

I guess the current partials aren't really state aware. Trying to think about the maintenance approach here... maintain styling and structure of components at component level with strict data structure or further up the WordPress chain with the loop and built-in WordPress stuff.

kpettinga commented 7 years ago

hey @davekellam i would vote to return the data array as opposed to html. Separation of content and design.

If it makes sense in the future we might have a function that returns data and then a function that builds html... but the two shouldn't be mixed, IMO.

davekellam commented 7 years ago

Yeah, I agree... it floats away from some traditional WordPress stuff, but it separates the front/back-end more. In theory just having the data returned would allow you to switch between front-end solutions more easily.

davekellam commented 7 years ago

Closing in favour of #37