I'm struggling to get the native switch function of EE to work at all when it's used inside my matrix tag pair, It's simply ignoring it. Could anyone offer any advice? Thanks

Here's my gist: https://gist.github.com/anonymous/7689336


  • Can you post a gist of the code you are having trouble with? Nov 27, 2013 at 22:49

1 Answer 1


Matrix field has his own {switch} tag, so channel {switch} tag (is it what you mean by "native switch function" ?) will be not working inside Matrix pair.

  • Hi Max and Paulo, thanks for responding. Is there away round this, as I don't think I can use the Matrix {switch} tag to achieve what I want. The page is a series of thumbnail images which display based on a segment. But the site is responsive so the images change from being in a row of 4, to 3 and then down to 2. Which is where the {switch} is needed. I have added my code to my original question.
    – Erbert
    Nov 28, 2013 at 9:19
  • I don't think that it is possible to do what you want this way. As I see from you code, you need combination of native switch + matrix switch. So only way do this - write plugin which will do switch processing after channel_entry will complete (our php code with processing on out). But right way - just use some JS plugin.
    – Max Lazar
    Jan 27, 2014 at 10:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.