Developer forum

Forum » Development » Extending NewsV2

Extending NewsV2


Reply
When extending the newsv2 module, which is great you can now.

I'm wondering why

Template.getLoop return a template and not a loop why is that?
Dynamicweb.Templatev2.Loop _newslist = new Dynamicweb.Templatev2.Loop(); //t.GetLoop("NewsList");


Another thing im wondering abit about is the following:
Loop.Add needs a tagcollection and not a tag?

And AddRange needs a List of tagcollections.

Wouldent it be smarter that Tags.Add takes a tag and not a tagcollection

and addrange takes a List of tags?


Replies

 
Reply
Hi there,

>> Template.getLoop return a template and not a loop why is that?

This is how loops work; you call GetLoop, and then get a template item back. Maybe the method should have been called GetLoopItem as that's what you get: a single template for a looped item.

Not sure where you're seeing Add and AddRange on a Loop class or property, so I can't comment on that.

Cheers,

Imar

 

You must be logged in to post in the forum