Developer forum

Forum » Templates » CustomerCenter.ListTypes.Lists does not render lists

CustomerCenter.ListTypes.Lists does not render lists

Aki Ruuskanen
Aki Ruuskanen
Reply

Hi,

I have a bit of a strange problem with this tag:

GetLoop("CustomerCenter.ListTypes.Lists")

I am logged in with a user that has a number of favouritelists. But the tag does not contain any lists unless I also have "TemplateTags" in the tempate.

Without "TemplateTags" no lists are rendered. With  "TemplateTags" correct lists are rendered.

Any ideas?

 

Regards / Aki

 


Replies

 
Nicolai Pedersen
Reply

Hi Aki

Can I see your entire template?

 
Aki Ruuskanen
Aki Ruuskanen
Reply

Here comes  (Still a work in progress...)

 
Aki Ruuskanen
Aki Ruuskanen
Reply

Hi, 

Any ideas on this one?

 

/Aki

 
Aki Ruuskanen
Aki Ruuskanen
Reply

I made a workaround. 

The code that did not render lists looks like this. 

 foreach (var listtype in GetLoop("CustomerCenter.ListTypes"))
 {
      foreach (var list in listtype.GetLoop("CustomerCenter.ListTypes.Lists")) // No lists
      {
          ....
      }
}

But if I get a value from listtype before getting the loop, it works. 

So I put a hidden span with a value from listype before the inner loop. 

 foreach (var listtype in GetLoop("CustomerCenter.ListTypes"))
 {
     <div style="display: none;"> @listtype.GetString("Ecom:CustomerCenter.List.Select.Name.Input") </div>
      foreach (var list in listtype.GetLoop("CustomerCenter.ListTypes.Lists")) // No lists
      {
         .....
      }
}

 

/Aki

 

 

 

 

You must be logged in to post in the forum