Developer forum

Forum » Templates » RAZOR eCom groups

RAZOR eCom groups

Rune Skovbo
Reply

Hi people

 

So I have ventured into the wolrd of Razor...

 

I need to loop through my eCom groups and have done so like this:

<ul class="productNav">
    @{
        
        var groups = GetLoop("Groups");
        
        foreach (var group in groups)
        {
            
            <li>
                    <a href='@group.GetValue("Ecom:Group.Link.Clean")'>
                        @group.GetValue("Ecom:Group.Name")
                     </a>
            </li>
        }
    
    }
</ul>

This loops through ALL my groups, but for now i only want the first level. How do I limit that?

 

Regards, 

Rune


Replies

 
Mikkel Ricky
Reply

What is the context? Are we in a product group template?

Best regards,
Mikkel

 
Rune Skovbo
Reply

Yeah, I was in a product group template, but never mind, found another solutoin :-)

 

/Rune

 

You must be logged in to post in the forum