captFuture
I'm new here

Hide and set <CMS_INPUT_TOGGLE to false by rule if in <FS_CATALOG

Good morning community,

For our bootstrap 4 based project i have several sectiontemplates with a <FS_CATALOG input and the editor can use standard templates like headline or text in that.

Our text templates have <CMS_INPUT_TOGGLE switches to activate several options around the actual html element.

If the template is used in an <FS_CATALOG field, the toggles should all be set to false and hidden, because in that case it should not be possible to set these options.

Unfortunately i am not able to write the correct <RULE to do so. Hiding is possible but setting the value is my problem.

<WITH>

        <EQUAL>

            <PROPERTY name="CONTAINERTYPE" source="#global"/>

            <TEXT>FS_CATALOG</TEXT>

        </EQUAL>

    </WITH>

    <DO>

        <NOT>

            <PROPERTY name="VISIBLE" source="st_containerstart"/>

            <PROPERTY name="VISIBLE" source="st_containerend"/>

            <PROPERTY name="VISIBLE" source="st_rowstart"/>

            <PROPERTY name="VISIBLE" source="st_rowend"/>

        </NOT>

    </DO>

</RULE>

Please Help

Thanks

Christoph

0 Kudos
4 Replies
StefanSchulz
I'm new here

Hi Christoph,

I assume, you already tried setting the value property on the respective toggle gadgets within the DO section? If so, do you get any ERROR, WARN, or DEBUG messages in the log file that refer to not working rules?

Cheers,

Stefan

0 Kudos

Correct, i was setting the VALUE like THIS:

   <NOT>
   <PROPERTY name="VALUE" source="st_containerstart"/>
   <PROPERTY name="VALUE" source="st_containerend"/>
   <PROPERTY name="VALUE" source="st_rowstart"/>
   <PROPERTY name="VALUE" source="st_rowend"/>

   </NOT>

This results in a switch to NO/false on the User interface but in the output with

$CMS_IF(st_containerstart == true)$<div id="container_$CMS_VALUE(#global.section.id)$" class="container">$CMS_END_IF$

it is true and shows the <div in the html output. (which is the opposite from the expected behaviour)

0 Kudos

Did you check the value of st_containerstart itself via CMS_VALUE? Just to make sure.

0 Kudos
MichaelaReydt
Community Manager

Hello Christoph,

is this still an open question? Do you need further help or did the given answers already help you? In this case it would be nice if you mark the "right answer".

Best regards

Michaela

0 Kudos