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

Adding Back Button To Header From Specific View

1 Answer 129 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Tracy
Top achievements
Rank 1
Tracy asked on 14 Apr 2015, 12:46 PM

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.

1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 16 Apr 2015, 09:44 AM
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.

 
Tags
General Discussion
Asked by
Tracy
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or