Developer forum

Forum » Development » Add custom tag to existing loop

Add custom tag to existing loop


Reply
Hi,

Is it possible to extend the existing standard loops in a ProductListTemplateExtender?

I'd like to add a few tags (ie productgroup images) to the loop "Subgroups" so these will be available in the template.

Any more or less working examples will be much appreciated

Best regards
Jonas

Replies

 
Reply
Nevermind the productgroup images part, since these magically appear when data is actually present :) (doh)
However, the question is still relevant...
 
Nicolai Høeg Pedersen
Reply
It is partly possible.

You can gain access to the loop like this:
For Each loopTemplate As [Loop] In t.Loops
                If loopTemplate.Name = "subgroups" Then
                    'Do stuff
                End If
            Next

But when template.commitLoop is called in our code, things happens to the data and it is put in a "cached" state and cannot be altered...

But you have access to the template object in the loop - but not for each element in the loop. Don't know if that can be used.

 

You must be logged in to post in the forum