Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dynamic default page #99

Closed
altmann opened this issue Feb 27, 2013 · 3 comments
Closed

dynamic default page #99

altmann opened this issue Feb 27, 2013 · 3 comments

Comments

@altmann
Copy link

altmann commented Feb 27, 2013

I know that I can define a default page with id 'start', but in need a more dynamic way to set the default page. The problem of these static defintion is, that I can't change the default page.

Example:
In scenario one I want to start with the first page, in scenario two with the second page. So, the static defintion of 'start' don't work for me. I need an javascript function, which setup the default page.

Simple suggestion:
setDefaultPage('member'); //setup default page in level one
setDefaultPage('member.profile'); //setup default page in level two
setDefaultPage('member.profile.apps'); //set default page in level three

PS: Big thanks and I love your new released extended page-href params syntax. 👍

@altmann
Copy link
Author

altmann commented Feb 27, 2013

I just see that you are planning to implement a role mangement. Great idea, please don't forget the dynamic setup of roles via javascript functions. So, it is very easy to change roles of pages (also the start page) while the app is running.

@finnsson
Copy link
Owner

I understand your use case and I think it's easy to support. I already got a method goTo but it's not exposed (an internal method inside the function that defines pager). All I have to do is expose the method on pager.

Then you'll be able to write code like

pager.start();
pager.goTo('member'/profile);

I should probably add something to start/startX as well or add something like setDefaultPage as you suggested. I'll see what I can to. At the moment you can do something like

pager.showChild(["member","profile"]);

to almost get what you are after (the "real" start page might be visible before your intended start page is displayed with this workaround).

@maxfridbe
Copy link

I was thinking that it would be good to be per level,
Like if you have a list of div's with page: bindings that one parameter could be default:true that way you are not forced to use the 'start' id

@DKhalil DKhalil closed this as completed May 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants