I am developing a web book application using the PHP framework CodeIgniter. Users will be able to add books, their chapters and the pages in each chapter. Page contents will be HTML, with internal and external links.
How can I add the internal link of a page from any internal book, where the page will be in a table with the book and chapter number reference? I may need to add links from the same book and from other books from same application. I may need to add a link for an external site as well.
I am using tinymce as page editor.
It all depends on how you want to do it:
Setup your urls as you want: http://www.yourbooksite.com/book/id/pageid or /book/id#pageid
You can also use Codeigniters url functions and do something like: http://www.yourbooksite.com/book/book_name/page_number or /book/book_name#page_number.
If you have all the pages compiled on the same page, then use page anchors (
#page_idor#page_num). You can use that on external sites as well, and the document will scroll to that section of the page.If they pages are displayed on their own pages, then just use the page_id or the page_number as another parameter you are passing.
This is an easy topic and purely preference. I can’t give code, and I can’t help fix code that you are not showing. I can get more specific, but your question is lacking, so ultimately, I can’t give you a definite answer of how to do something.