So after a few days I finally figured out how to accomplish pagination/page numbers with Matrix. It took me forever and there wasn’t a demo anywhere so I hope this helps someone else. You’ll need the Simple Math plugin as suggested by Pixel & Tonic.
sample code
—————————-
{preload_replace:rows_per_page="12"}
<ul>
{exp:channel:entries channel="galleries" url_title="{segment_2}" dynamic="no"}
{gallery}
{if row_count <= {exp:simple_math calculate='ceil({total_rows}/{rows_per_page})'}}
{if {exp:simple_math calculate='({row_count}-1)*{rows_per_page}'} == '{segment_3}'}<li><a href="http://{path=%27gallery/{segment_2}/{exp:simple_math" class="selected">{row_count}</a></li>
{if:else}<li><a href="http://{path=%27gallery/{segment_2}/{exp:simple_math">{row_count}</a></li>{/if}
{/if}
{/gallery}
{/exp:channel:entries}
</ul>
description of code
—————————-
• rows_per_page variable should be set to however many thumbs you want displayed in gallery
• first parent if conditional loops through to get page count
• second and third conditional check to highlight current page (setup css for class for “selected”)
• ceil= stands for ceiling and is used in the Simple Math tag to round up to get the total pagination count
• url_title=”{segment_2}” //limits the query to just one matrix entry like “rings” or “pendants” for example
• {segment_2} second url segment “example: rings in the following url”
• {segment_3} third url segment “example: 24 in the following url”
<a href="http://www.website.com/index.php/gallery/rings/24">http://www.website.com/index.php/gallery/rings/24</a>