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

Already on GitHub? Sign in to your account

chapter / section #84

comfused opened this Issue Apr 30, 2011 · 8 comments


None yet
5 participants


I was wondering if the following is possible - or will be in the future:

I'd like that each folder inside the 'book' folder is considered as a chapter / section.
The swiping between pages is only possible inside a chapter / section.
To go to another chapter / section you need to click on a link, that links to a page in another folder.

Also, it would be nice to have a setting (inside RootViewController.m for example) to disable the swiping between pages - so you can only go to another page by clicking on a link.

ffranke commented May 3, 2011

"Also, it would be nice to have a setting (inside RootViewController.m for example) to disable the swiping between pages - so you can only go to another page by clicking on a link."

But then you wouldn't need Baker. You could build it as a normal website and ask users to "save it to homescreen".


comfused commented May 3, 2011

Time has already learned us that people want an app to download/install
I wonder how many people know the 'save to homescreen' functionality

Thing is, I'm building a 'conference schedule app'
and you don't want the user to be able to swipe on all pages - cause that is not what the user is expecting
the swiping is good, for certain parts of the app
so if I could work with subfolders inside the 'book' folder - and have only swiping able inside each folder - that would be also good

example structure:

  • book folder
    --- index.html
    --- saturday folder
    ------ speaker001.html
    ------ speaker002.html
    ------ speaker003.html
    --- sunday folder
    ------ speaker001.html
    ------ speaker002.html
    ------ speaker003.html

this way:

  • I can link from the index page to the 2 days
  • people can swipe between pages inside a certain folder ('sunday folder' for example)
  • but you won't swipe from a page from folder A to a page in folder B

hope I make myself clear :)


Xm4s commented May 4, 2011

Hi comfused!

With the actual version of Baker you can do something like that with the aid of the "downloadable books" feature.

You can bundle inside your Baker app a book with just one page, which contains all the link to the other books.
A tap on one of those link will start the download of the "new" book and at the end will open it; the book then will be navigable like a normal Baker book.
In each book a link to book://local must be provided, which, when clicked, will return the user back to the main bundle book.

That would be a simple solution for you case, the only drawback is that now Baker doesn't store more than one book at a time: when you return to the bundle book the last downloaded book is deleted, so every time you switch from a book to another you'll have to download it.

I think you don't need any folder. Reading the Baker documentation, the application will browse alphabetically all the pages. Well, you can "recreate" a folder tree without folders, simply by using a combination of letters and numbers. For example:



If you sort them alphabetically, you'll end up with the same functionality as the use of folders.

And for a way to restrict the navigation to just one folder, maybe the app can trigger a javascript in the last page of the series. For example, an onLoad event that redirects to the first page of the chapter.

comfused commented May 6, 2011

the sorting I understand
but I don't want the user to be able to swipe from a999.html to b001.html
and I'm afraid javascript isn't going to solve this

Works like a charm!!!

Paste this simple line inside an script label (in the head section of an empty html page) and it will redirect to the first page of the stack:

document.location = "a001.html";

(I can't put the entire head code because this blog parses the content and I don't know how to avoid this).


folletto commented May 23, 2011

Ok, to summarize:

  • It's outside the scope of Baker as it's intended.
  • It seems doable in javascript.
  • Still, it's going to be managed well with the multi-hpub support, once ready.

I think that's all, I close this issue. If there's something else, please comment. ;)

@folletto folletto closed this May 23, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment