Do UI Policies work on Break Variables?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2014 02:57 PM
Hello,
Can you use a UI Policy to hide a Break Variable on a Catalog Item? Can't seem to get this to work. Also, tried using a Catalog Client Script.
Thanks!
Mark Didrikson
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2014 03:23 PM
I am on Calgary. From what I can see of a break variable, it is:
<tr id='io_break'>
<td>
<hr></hr>
</td>
</tr>
in the markup.
The break variable didn't respond to setVisible() nor setDisplay() so I used DOM methods.
One fast way to hide it:
var breaks = document.getElementsByClassName('io_break');
for(var i in breaks) {
breaks[i].style.display = 'none';
}
Unfortunately this will hide ALL the breaks on the page, which is probably not what you intend. If you wanted to hide a specific break it gets more messy. You can experiment until you find the break you are looking for:
var breaks = document.getElementsByClassName('io_break');
alert('hiding 1st break');
breaks[0].style.display = 'none';
alert('hiding 2nd break');
breaks[1].style.display = 'none';
alert('hiding 3rd break');
breaks[2].style.display = 'none';
//etc...
Good luck!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2014 10:15 AM
Thanks! Very helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2014 10:18 AM
Are you saying you can't hide a break variable conditionally via a UI policy? If not, have you tried adding the break inside of a container and hiding the entire container?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2015 09:18 AM
putting them in a container worked perfectly for me.