Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Conversation

jgable
Copy link
Contributor

@jgable jgable commented Jul 5, 2011

I drastically simplified my previous code by just looking for the data-add-back-btn attribute on the list and adding the attribute to the header template for the created page before the page.page() call. This way, the page() method can use it's existing logic to add the back button instead of repeating it here.

I'm still defaulting to showing the back button if not specified and I haven't included any ability to theme.

@scottjehl
Copy link

Thanks for this idea. We agree that nested lists need a form of breadcrumb (or other) navigation to be able to reach the top-level list when opening a deep link. However, we don't think it should be solved with the regular back button, but rather something custom to the nested list plugin.

For one thing, our back buttons (when visible) always map to the browser's back button 1-to-1 (they simply trigger history.back() ), whereas this situation isn't always about going "back" as it is going to a new and separate -- albiet, parent -- page. This would not work as expected if you opened a deep-link to a nested list, since clicking back would take you to a potentially different site altogether.

Basically, the browser's back button handles this issue the same way this fix would, but we need to inject a link to the parent list, and probably style it differently than a normal back button.

I'll add this note the issue. Thanks again!

@scottjehl scottjehl closed this Jul 10, 2011
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants