This is a migrated thread and some comments may be shown as answers.

How do I hide the footer on some views?

2 Answers 765 Views
AppBuilder companion app
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Stewart
Top achievements
Rank 1
Stewart asked on 22 Oct 2013, 11:59 AM
I have a page footer which I want to show on all views other than the "home" view when I am asking the user to login (so don't want to show the navigation options). Is this possible using a layout and views?

The code I have for the layout section is as follows, where you can see I use "data-bind="visible: isLoggedIn" - which works correctly in views, but doesn't work here. Any suggestions, please?

<!--Layout-->
        <div id="tabstrip-home"
            data-role="layout"  
            data-id="tabstrip-layout"
            data-model="app.loginService.viewModel">

            <!--Header-->
            <div data-role="header" style="background-color: white">
                <div data-role="navbar">
                    <span data-role="view-title"></span>
                </div>
            </div>

            <!--Footer-->
            <div data-role="footer" data-bind="visible: isLoggedIn">
                <div data-role="tabstrip">
                    <a href="#tabstrip-wall" data-icon="contacts">Wall</a>
                    <a href="#tabstrip-agenda" data-icon="contacts">Agenda</a>
                    <a href="#tabstrip-workshops" data-icon="search">Workshops</a>
                    <a href="#tabstrip-hospitality" data-icon="globe">Hospitality</a>
                    <a href="#tabstrip-home" data-icon="globe">Log out</a>
                </div>
            </div>
        </div>

Thanks!
Stewart

2 Answers, 1 is accepted

Sort by
0
Accepted
Steve
Telerik team
answered on 23 Oct 2013, 03:32 PM
Hello Stewart,

data-bind would work only if the footer is part of the view and in your case it is in the layout. The model applies only to the view. Move it to a view and the binding would work. If you want to keep a common footer, you can hide it manually whenever needed, the visible binding only sets display:none.

Regards,
Steve
Telerik
You've missed the Icenium Visual Studio Integration keynote? It has been recorded and posted here.
Looking for tips & tricks directly from the Icenium team? Check out our blog!
Share feedback and vote for features on our Feedback Portal.
0
Stewart
Top achievements
Rank 1
answered on 23 Oct 2013, 11:52 PM
Thanks Steve. That's what I figured.
Tags
AppBuilder companion app
Asked by
Stewart
Top achievements
Rank 1
Answers by
Steve
Telerik team
Stewart
Top achievements
Rank 1
Share this question
or