Adding Back Button To Header From Specific View

2 posts, 0 answers
  1. Tracy
    Tracy avatar
    3 posts
    Member since:
    Mar 2015

    Posted 14 Apr 2015 Link to this post

    I'm using Kendo UI Mobile, with a Kendo Layout so that my header is displayed in all views.

    On some views i want to add a back button to the header, so that the user can navigate back to the main screen.

    What is the correct way to add the button on the header? If i add it too the view's html, the button is displayed beneath the header.

     

    Any help is greatly appreciated.

  2. Tsvetina
    Admin
    Tsvetina avatar
    1874 posts

    Posted 16 Apr 2015 Link to this post

    Hello Tracy,

    To add a button that will appear in the app header, you need to define it in the Layout used by the view in question. The layouts are usually defined in index.html using data-role="layout" assignment.

    If you want only some of the views to show a button and some not, then you need to define two different layouts - one with the button and one without. Then, go through your views and set the data-layout property of each view to the corresponding layout id.

    You can see a sample which demonstrates a Home view using its own layout and two other views using a layout with a back button here:
    http://dojo.telerik.com/oKaZE

    Just note that the back button will not be functioning as expected in the Kendo UI Dojo. You can copy the sample code into a stand alone page or AppBuilder project and test it.

    I hope this information helps.

    Regards,
    Tsvetina
    Telerik
     

    Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

     
Back to Top