I need to know outside of the Matrix tag pair the total rows that it has. To get total rows within the tag pair, this works for me:


Outside the tag pair, it seems like this should work: {matrix_field_short_name:total_rows} per http://pixelandtonic.com/matrix/docs/templates. However, instead of getting an integer, I'm getting the string http://domain.com/member_uploads/_s:total_rows/slide.jpg.

My Matrix field is names images and it contains the columns image (the file) and caption (a text field).

Any idea what might be going on?

EDIT 1: Code Snippet


    <div class="{if row_count == 1}active{/if} item">
        <img src="{image:250x250}" alt="{caption}"/>
    <div class="carousel-caption">
  • it should work, able to provide additional code from within your template?
    – Tad Ward
    Jan 4, 2013 at 2:01
  • See edit. Everything in {images} works as expected. I don't get total rows in the h1. Jan 4, 2013 at 2:19
  • what does your exp:channel:entries tag look like? is the above code the only thing in the template? I assume latest version of matrix, tried re-uploading?
    – Tad Ward
    Jan 4, 2013 at 2:38
  • It looks like a conflict with names. I'd try renaming your matrix field to something else.
    – Tyssen
    Jan 4, 2013 at 2:48
  • yeah I'd say name conflict is the most probably, go with a strict or firm naming convention for you fields ala digitalevangelist.net/notes/whats-in-a-name Jan 4, 2013 at 2:50

1 Answer 1


I agree with the name. I've run into that before. I have adapted a matrix naming convention of a small prefix from the matrix field then whatever I need : eg. seg-images if the matrix field is segments. In your case, it looks like you have images as the matrix field itself. Try naming it something like mx-images.

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.