3D FlipBook - How to create book template in v1.14, filter
b***l@gmail.com
2023-01-17
2024-02-05
Hi,
I love this new update, this was exactly what I was looking for! But how can I create a new book template? I don’t see any option and there’s any mention in the documentation.
Edit any book, check shows advanced options. In the end of General tab: Save this book as Template. It does not affect on pages and bookmarks, because they are different for all books.
b***l@gmail.com
2023-01-17
2023-01-17
Hi,
That was helpful :)
I saved a book as a template, and then I used in the shortcode as you said on the release notes, like this:
[3d-flip-book pdf="http://mysite.com/sample.pdf" book-template="Journal"][/3d-flip-book]
The issue is that I don't see the elements saved on my book in the new PDF url. For example, I added a image on page 1 in the original book/template, but now If I use a template, I see my new PDF but can't see that image in the first page. How can I do that?
Thanks!
a***r@3dflipbook.net
2023-01-17
2023-01-17
Templates do not affects on pages, function what you need is a little different, we cannot understand how to create template for set of pages, because all books have different pages amount and their content. So please describe your case that we could figure out how we can help you.
b***l@gmail.com
2023-01-17
2023-01-17
Hi again,
Sure, let me explain:
I want to create a template with some custom content in each page (like images, HTML...).
Then, I want to dynamically show different custom PDF based on order checkout
That PDF would be displayed in the 3D books, but I would like to keep the images and HTML in the same place and page for all the PDF with the same template name.
So basically, I'd like to have a template with custom content and let me applied that template in different PDF. And about "not every PDF have the same pages", in my case it does, but even if it isn't the case, the template could just applied the custom content (images, HTML...) just in the pages that the PDF have.
I hope that I had explain my self a little bit better.
Best regards.
a***r@3dflipbook.net
2023-01-19
2023-01-19
Well, in this case the easiest way is create a filter for book data and simply replace pdf URL with that what you need. You will need to add some php code (filtering function) in your theme functions file, and we will add this filter in out plugins API.
b***l@gmail.com
2023-01-19
2023-01-19
Hi,
I actually have the code to replace the PDF url, so no problem about that, but how can I do the other stuff? Can you help me with this custom work? If have an email address, I can give you more details.
Thanks a lot!
a***r@3dflipbook.net
2023-01-19
2023-01-19
I would recommend to add in your theme functions something like this
we already added this filter in our code, but will publish it in next release, so you can easily update the plugin in the future.
b***l@gmail.com
2023-01-19
2023-01-19
Hi,
What an amazing support! Really happy with the plugin and the feedback.
About the code, would be necessary to add the functions.php code also if I wait until new update?
Thanks!
a***r@3dflipbook.net
2023-01-19
2023-01-19
Yes you need to do this. This case is quite specific so we are not planning to add it for all.
b***l@gmail.com
2024-02-19
2024-02-19
Hi, so I added the code you gave in functions.php and use the shortcode [3d-flip-book-filter pdf="xxxxx.pdf" pages="52"][3d-flip-book mode="fullscreen" id="XXXX"][/3d-flip-book][/3d-flip-book-filter] and replaced the ID for my own one, but unfortunately the external PDF url it isn't being displayed. It is being displayed the default PDF uploaded in the template... so what's the issue?
Thanks!
I just see this reference in "Settings": https://i.gyazo.com/814dbd0ae69f682ff69bb8beb3ffbbfd.png but I can't find the "Book templates" section anywhere.
Thanks!
Edit any book, check shows advanced options. In the end of General tab: Save this book as Template. It does not affect on pages and bookmarks, because they are different for all books.
Hi, That was helpful :) I saved a book as a template, and then I used in the shortcode as you said on the release notes, like this: [3d-flip-book pdf="http://mysite.com/sample.pdf" book-template="Journal"][/3d-flip-book] The issue is that I don't see the elements saved on my book in the new PDF url. For example, I added a image on page 1 in the original book/template, but now If I use a template, I see my new PDF but can't see that image in the first page. How can I do that? Thanks!
Templates do not affects on pages, function what you need is a little different, we cannot understand how to create template for set of pages, because all books have different pages amount and their content. So please describe your case that we could figure out how we can help you.
Hi again,
Sure, let me explain:
So basically, I'd like to have a template with custom content and let me applied that template in different PDF. And about "not every PDF have the same pages", in my case it does, but even if it isn't the case, the template could just applied the custom content (images, HTML...) just in the pages that the PDF have.
I hope that I had explain my self a little bit better.
Best regards.
Well, in this case the easiest way is create a filter for book data and simply replace pdf URL with that what you need. You will need to add some php code (filtering function) in your theme functions file, and we will add this filter in out plugins API.
Hi, I actually have the code to replace the PDF url, so no problem about that, but how can I do the other stuff? Can you help me with this custom work? If have an email address, I can give you more details. Thanks a lot!
I would recommend to add in your theme functions something like this
and then simply use it like this:
also you need to add filter call in the plugin file ajax-get.php
we already added this filter in our code, but will publish it in next release, so you can easily update the plugin in the future.
Hi,
What an amazing support! Really happy with the plugin and the feedback.
About the code, would be necessary to add the functions.php code also if I wait until new update?
Thanks!
Yes you need to do this. This case is quite specific so we are not planning to add it for all.
Hi, so I added the code you gave in functions.php and use the shortcode [3d-flip-book-filter pdf="xxxxx.pdf" pages="52"][3d-flip-book mode="fullscreen" id="XXXX"][/3d-flip-book][/3d-flip-book-filter] and replaced the ID for my own one, but unfortunately the external PDF url it isn't being displayed. It is being displayed the default PDF uploaded in the template... so what's the issue? Thanks!