Open the portfolio grid with a data-filter (example: Icons) already selected - example page portfolio.html

✓ Resolved3 replies·opened Oct 10, 2026
W
web_wolfOct 10, 2026

hi there,

First of all: thank you for Canvas. It's the best!

Now my question:
I am using the portfolio grid with several categories, but I want to open the page with a data-filter (.pf-icons) already enabled - instead of all items.

<ul class="grid-filter" data-container="#portfolio">
    <li><a href="#" data-filter="*">Show All</a></li>
    <li class="activeFilter"><a href="#" data-filter=".pf-icons">Icons</a></li>
    <li><a href="#" data-filter=".pf-illustrations">Illustrations</a></li>
    <li><a href="#" data-filter=".pf-uielements">UI Elements</a></li>
    <li><a href="#" data-filter=".pf-media">Media</a></li>
    <li><a href="#" data-filter=".pf-graphics">Graphics</a></li>
</ul>

What do I have to do to open the page with the grid respecting this filter: showing only the items corresponding to this data-filter.
Is is now still showing all items.

Hope to hear soon.

Best regards,

Wiebe

S
SemiColonWebSTAFFOct 11, 2026

Hello,

Thanks for reaching out!

You can set a default filter on the grid filter list using the data-default attribute. Move the activeFilter class back to the "Show All" item, then add data-default pointing to the filter you want to load first:

<ul class="grid-filter" data-container="#portfolio" data-default=".pf-icons">
    <li class="activeFilter"><a href="#" data-filter="*">Show All</a></li>
    <li><a href="#" data-filter=".pf-icons">Icons</a></li>
    <li><a href="#" data-filter=".pf-illustrations">Illustrations</a></li>
    <li><a href="#" data-filter=".pf-uielements">UI Elements</a></li>
    <li><a href="#" data-filter=".pf-media">Media</a></li>
    <li><a href="#" data-filter=".pf-graphics">Graphics</a></li>
</ul>

This will load the page with only the .pf-icons items visible, while keeping "Show All" available as an option for visitors.

Please do let us know if we can help you with anything else.

W
web_wolfOct 11, 2026

Thank you so much: this works like a charm!
I am very happy again!

S
SemiColonWebSTAFFOct 11, 2026

Very Happy to Help! :)

Please do let us know if we can help you with anything else.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard
Open the portfolio grid with a data-filter (example: Icons) already selected - example page portfolio.html · Canvas Template Support