Solved displaying multiple views in the same category
#1
Heart 
Hello, I need your help
Here is the code of the parameters of a view

There are 4 types of views on the same category (thumbnails )
Big Grid, Small, Small Atl and Original

into .Xml view (view_icon.xml) about coding and 57/571/573/576.

I fail to understand and display a view. When I put the "!" To 57 of 576 , the view 571 no longer displays and so on.

I do not understand exactly what is the "!" Represents what? "!" = True? "!" = False?
Can you tell me where there is an error in the coding of the view! thank you

Cheers




PHP Code:
<!--thumbnailslarge grid small /Small Alt Small Original-->
                <
control type="button" id="114">
                    <
label>$VAR[view_Layout]</label>
                    <
onclick condition="Control.IsVisible(57) + [Container.Content(movies) | Container.Content(tvshows) | Container.Content(seasons) | Container.Content(sets)]">Container.SetViewMode(571)</onclick>
                    <
onclick condition="Control.IsVisible(571) + [Container.Content(movies) | Container.Content(tvshows) | Container.Content(seasons) | Container.Content(sets)]">Container.SetViewMode(57)</onclick>
                    <
onclick condition="Control.IsVisible(57) + [Container.Content(movies) | Container.Content(tvshows) | Container.Content(seasons) | Container.Content(sets)]">Container.SetViewMode(573)</onclick>
                    <
onclick condition="Control.IsVisible(573) + [Container.Content(movies) | Container.Content(tvshows) | Container.Content(seasons) | Container.Content(sets)]">Container.SetViewMode(57)</onclick>
                    <
onclick condition="!Control.IsVisible(57) + [Container.Content(movies) | Container.Content(tvshows) | Container.Content(seasons) | Container.Content(sets)]">Container.SetViewMode(576)</onclick>
                    <
onclick condition="Control.IsVisible(576) + [Container.Content(movies) | Container.Content(tvshows) | Container.Content(seasons) | Container.Content(sets)]">Container.SetViewMode(57)</onclick>
                    <
onclick condition="Control.IsVisible(572) + Container.Content(addons)">Container.SetViewMode(574)</onclick>
                    <
onclick condition="Control.IsVisible(574) + Container.Content(addons)">Container.SetViewMode(572)</onclick>
                    <include>
menu_Button</include>
                    <
visible>[Control.IsVisible(57) | Control.IsVisible(571) | Control.IsVisible(572) | Control.IsVisible(573) | Control.IsVisible(574) | Control.IsVisible(576)] + [Container.Content(movies) | Container.Content(tvshows) | Container.Content(seasons) | Container.Content(sets) | Container.Content(addons)]</visible>
                </
control
Reply
#2
"!" = False
Reply
#3
if '!' = False, then how to interpret this in the view?

(57) line 1 = no "!" So it appears?
(571) line 2 = "no "! "So it appears?

And so on ...?

So why does not work?


this latter view, I put "!" on the penultimate view without really understanding, I tried several and this way, it work So what if I repeated the same thing on the thumbnail view, why it does not work?



<control type="button" id="113">
<label>$VAR[view_Layout]</label>
<onclick condition="Control.IsVisible(53)">Container.SetViewMode(531)</onclick>
<onclick condition="Control.IsVisible(531)">Container.SetViewMode(53)</onclick>
<onclick condition="!Control.IsVisible(53)">Container.SetViewMode(532)</onclick>
<onclick condition="Control.IsVisible(532)">Container.SetViewMode(53)</onclick>
<include>menu_Button</include>
<visible>[Control.IsVisible(53) | Control.IsVisible(531) | Control.IsVisible(532)] + [Container.Content(movies) | Container.Content(tvshows)]</visible>
<visible>Skin.HasSetting(gallery.enable)</visible>
</control>


How to interpret it?

I hope you understand what I mean , otherwise, I'll go to sleep then Sad lol
Reply
#4
The "false" doesn't necessarily apply to a view appearing or not, it applies to the conditions you set yourself.

btw, the piece of code you've pasted has nothing to do with setting views to be visible or invisible, it just toggles the visibility of the viewtype layout switches.

So for example:

PHP Code:
<onclick condition="!Control.IsVisible(53)">Container.SetViewMode(532)</onclick

Makes the button switch to view ID 532 if the current view is not ID 53

and

PHP Code:
<onclick condition="Control.IsVisible(532)">Container.SetViewMode(53)</onclick
Makes that same button change the view to ID 53 if the current view is ID 532

But the actual availability of views is handled by visibility conditions on the various containers that actually make up the views.
Reply
#5
Oh my god, I didn't understand it , I done redundancy! Thank you very much Jeroen

it s good now Smile Thx
Reply

Logout Mark Read Team Forum Stats Members Help
displaying multiple views in the same category0