Developer forum

Forum » CMS - Standard features » Itemtype: Render all fields within specific Groups

Itemtype: Render all fields within specific Groups

P. Ruiter
Reply

Hello Dynamicweb,

I just started an Item Type related project with Dynamicweb. Great to see to flexibililty of the itemtypes.

The customer is also very exited about the itemtypes. That why the customer configured 20 different Fieldgroups (specification groups) within the itemtypes with different fields (specifications) within.

Now I want to render the groups, and within all the groups the fields with matching value.

I cannot see a group within the fields. I cannot get the fields within the groups. It seems there's a relation missing?

Please help me to solve this easy question. Thanks in advance.

Pim


Replies

 
Nicolai Høeg Pedersen
Reply
This post has been marked as an answer

Hi Pim

You can do like this:

       <!--@LoopStart(ItemPublisher:Items.List)-->
            <!--@LoopStart(ItemPublisher:Item.Groups)-->
                <!--@LoopStart(ItemPublisher:Item.Group.Fields)-->
                    <!--@ItemPublisher:Item.Field.Name-->
                    <!--@ItemPublisher:Item.Field.Value-->
                <!--@LoopEnd(ItemPublisher:Item.Group.Fields)-->
            <!--@LoopEnd(ItemPublisher:Item.Groups)-->
        <!--@LoopEnd(ItemPublisher:Items.List)-->

If you are note in an item publisher, it is the same thing - you just have another prefix than "ItemPublisher"

BR Nicolai

Votes for this answer: 1
 
P. Ruiter
Reply

Hi Nicolai,

It was my loop-in-loop Razor syntax fault that was the challenge blush

My Razor knowledge is now updated and everything works fine! Thanks!

BR Pim

 

You must be logged in to post in the forum