Developer forum

Forum » Ecommerce - Standard features » Exclude hidden product Fields from display

Exclude hidden product Fields from display

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

DW 9.7.2 + Rapido 3.1

I have some fields that are used for internal purposes only. Like a boolean field that has to trigger some logic. The field should be visible for admins, should be accessible in the template but should not be displayed automatically by the Fields block.

I have tried playing with "Hidden", "Read only" and "Do not render" and I could not find any combination of these 3 options that would help me.

I see that the CustomFieldsValues Loop does not include any mention of the Hidden property.

If I set it to not render, I cannot access it in the template.

I would see appropriate to have the properties included in the tags available in the loop. But this change, if it will ever make it in a release, is not gonna be available very soon.

What other alternatives do I have to accomplish this apparently simple task?

Thank you,
Adrian


Replies

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

HI Adrian,

 

I've been coming to use Field Display Groups for these. That allows you to create a list of fields that you want to group and sort, regardless if they are standard fields, custom fields, category fields or property fields.

 

Check this post to see how you can get that to work. You can also check my latest answer here .

 

With this approach you can have a group of "Comparable fields" to use in a Compare Products template, which is also pretty handy.

 

Best Regards,

Nuno Aguiar

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nuno,

Thank you for the suggestion.

I would use "Display Groups" especially because it was something I have been requesting for years There are a few reasons I have not considered them for this project:

1. They are not implemented in Rapido

2. They don't seem to be ready to be used easily in templates.

I know I have been trying to use them even in one of your projects, and we ended up with a few ninja tricks for getting out the values of the fields.

It is true I have not tried it in the latest (9.7.x) branch but since they are not implemented by default in Rapido, I can only assume they are not ready to be used yet.

That's why I was looking for a short term alternative.

I will check your suggested thread anyway and maybe I can use some of that wisdom :)

Thank you very much,
Adrian

 

You must be logged in to post in the forum