Feature Request: Templating System #120

Closed
opened 2026-02-04 16:58:49 +03:00 by OVERLORD · 27 comments
Owner

Originally created by @davidPilkington on GitHub (Jun 17, 2016).

Allow the creation of Page templates. Templates would allow pages to be created with standard formatting and would present to the user as a form on creation

Originally created by @davidPilkington on GitHub (Jun 17, 2016). Allow the creation of Page templates. Templates would allow pages to be created with standard formatting and would present to the user as a form on creation
OVERLORD added the 🛠️ Enhancement label 2026-02-04 16:58:49 +03:00
Author
Owner

@bridgeyuwa commented on GitHub (Jun 17, 2016):

You Can customize the blade templates by editing them to your specs. A template Generator is a good idea but if it should be added, I'll suggest it as a plugin extention and not part of bookstack core. For now, you can edit the desired templates at Resources/views/* directory.

@bridgeyuwa commented on GitHub (Jun 17, 2016): You Can customize the blade templates by editing them to your specs. A template Generator is a good idea but if it should be added, I'll suggest it as a plugin extention and not part of bookstack core. For now, you can edit the desired templates at Resources/views/\* directory.
Author
Owner

@ssddanbrown commented on GitHub (Jun 17, 2016):

@bridgeyuwa I'm pretty sure this request is for content templates, not page generation templates.

@davidPilkington Yeah, I like this idea. I think this would sit well in the editor sidebar, Where the tags currently are.

@ssddanbrown commented on GitHub (Jun 17, 2016): @bridgeyuwa I'm pretty sure this request is for content templates, not page generation templates. @davidPilkington Yeah, I like this idea. I think this would sit well in the editor sidebar, Where the tags currently are.
Author
Owner

@bridgeyuwa commented on GitHub (Jun 23, 2016):

@ssddanbrown how about mathjax? I could use their cdn but I and many others would like to be able to work offline with it too... they make use of Apache 2.0 licence

@bridgeyuwa commented on GitHub (Jun 23, 2016): @ssddanbrown how about mathjax? I could use their cdn but I and many others would like to be able to work offline with it too... they make use of Apache 2.0 licence
Author
Owner

@LeDistordu commented on GitHub (Jul 19, 2016):

+1

@LeDistordu commented on GitHub (Jul 19, 2016): +1
Author
Owner

@raisoftware commented on GitHub (Aug 3, 2016):

+1

@raisoftware commented on GitHub (Aug 3, 2016): +1
Author
Owner

@Shackelford-Arden commented on GitHub (Dec 1, 2016):

+1

@Shackelford-Arden commented on GitHub (Dec 1, 2016): +1
Author
Owner

@mojoaar commented on GitHub (May 17, 2017):

+1 for a template for content templates to standardize docs.

@mojoaar commented on GitHub (May 17, 2017): +1 for a template for content templates to standardize docs.
Author
Owner

@bcc-sysops commented on GitHub (Feb 17, 2018):

+1

@bcc-sysops commented on GitHub (Feb 17, 2018): +1
Author
Owner

@jspaans91 commented on GitHub (Mar 28, 2018):

+1 it would be nice when you can template or duplicate a whole book.

@jspaans91 commented on GitHub (Mar 28, 2018): +1 it would be nice when you can template or duplicate a whole book.
Author
Owner

@skluthe commented on GitHub (Apr 19, 2018):

Any news on this?

@skluthe commented on GitHub (Apr 19, 2018): Any news on this?
Author
Owner

@ssddanbrown commented on GitHub (Apr 21, 2018):

@skluthe No, not really, although it's high up in terms of thumbs-up so won't go ignored and is something I think would be greatly beneficial in a platform like this.

I've been thinking the sidebar on the page editor would be a good place to have a listing of templates. Ideally with a preview but that gets more complex.

The trickier part is defining templates. Easiest option would be a simple checkbox option on page created to 'Mark as template'. Then you could organise your templates into their own book if you wanted. Would be much more complex to develop a whole separate 'Template manager' area.

@ssddanbrown commented on GitHub (Apr 21, 2018): @skluthe No, not really, although it's high up in terms of thumbs-up so won't go ignored and is something I think would be greatly beneficial in a platform like this. I've been thinking the sidebar on the page editor would be a good place to have a listing of templates. Ideally with a preview but that gets more complex. The trickier part is defining templates. Easiest option would be a simple checkbox option on page created to 'Mark as template'. Then you could organise your templates into their own book if you wanted. Would be much more complex to develop a whole separate 'Template manager' area.
Author
Owner

@Nebucatnetzer commented on GitHub (Jan 31, 2019):

The 'Mark as template' option would work quite well for me.

@Nebucatnetzer commented on GitHub (Jan 31, 2019): The 'Mark as template' option would work quite well for me.
Author
Owner

@davidPilkington commented on GitHub (Feb 1, 2019):

Would marking a page as a template save the page where it was created? If so, it would be great to have a book of templates that would only be visible at Editor and above levels.

@davidPilkington commented on GitHub (Feb 1, 2019): Would marking a page as a template save the page where it was created? If so, it would be great to have a book of templates that would only be visible at Editor and above levels.
Author
Owner

@Nebucatnetzer commented on GitHub (Feb 1, 2019):

Would make the most sense to me. This way you could create templates for different books/chapters/ and store them where it makes the most sense for you.

@Nebucatnetzer commented on GitHub (Feb 1, 2019): Would make the most sense to me. This way you could create templates for different books/chapters/ and store them where it makes the most sense for you.
Author
Owner

@ssddanbrown commented on GitHub (Feb 5, 2019):

@davidPilkington Yeah, It would be a standard page in all other respects.

This is a fairly highly requested feature and something I think would be a good fit for BookStack so I have marked it for implementation in the major release after the next (v0.27). This schedule is based on the below proposal, If below does not meet most use-cases this schedule may have to change.

The below proposal defines the initial implementation to meet this feature request so is therefore simplistic but can be built upon in the future.


Proposal

  • A "Templates" panel is added to the page-edit view.
  • Within the "Templates" panel there will be a "Mark as template" checkbox.
    • To control this, A new "Manage Templates" system permission will be required.
  • Within the "Templates" panel will be a list of existing templates to choose from.
    • Visibility, and use, of a template will be based on the user having "View" permission to the pages that are templates therefore Access can be controlled via standard page permissions.
    • Selecting a template will simply fetch the contents of that page and insert them into the current page being edited.

My Ramblings

By utilising the existing page system it brings loads of useful things with it (Permissions, organisation, editor, revisions) reducing implementation effort greatly. One of the main concerns I can foresee is that people won't want template items like this visible in areas like 'Recently updated'.

We could maybe ignore pages marked as templates in various lists or alternatively we could maybe give chapters their own little feature of being able to mark themselves, and their contents, as being "Unlisted" which will hide content from such lists, Perhaps also prevent search-engine parsing. You could have a "Meta book" (Admins only) with chapters (Allow all to view) to hold templates/other bits but have their contents unlisted. More hassle to build and for admins to set-up but adds a system-wide feature that could be used for other bits and makes chapters a little more unique. Just throwing out ideas though. I'll have a think.

Feedback welcomed and appreciated.

@ssddanbrown commented on GitHub (Feb 5, 2019): @davidPilkington Yeah, It would be a standard page in all other respects. This is a fairly highly requested feature and something I think would be a good fit for BookStack so I have marked it for implementation in the major release after the next (v0.27). This schedule is based on the below proposal, If below does not meet most use-cases this schedule may have to change. The below proposal defines the initial implementation to meet this feature request so is therefore simplistic but can be built upon in the future. --- ### Proposal * A "Templates" panel is added to the page-edit view. * Within the "Templates" panel there will be a "Mark as template" checkbox. * To control this, A new "Manage Templates" system permission will be required. * Within the "Templates" panel will be a list of existing templates to choose from. * Visibility, and use, of a template will be based on the user having "View" permission to the pages that are templates therefore Access can be controlled via standard page permissions. * Selecting a template will simply fetch the contents of that page and insert them into the current page being edited. --- #### My Ramblings By utilising the existing page system it brings loads of useful things with it (Permissions, organisation, editor, revisions) reducing implementation effort greatly. One of the main concerns I can foresee is that people won't want template items like this visible in areas like 'Recently updated'. We could maybe ignore pages marked as templates in various lists or alternatively we could maybe give chapters their own little feature of being able to mark themselves, and their contents, as being "Unlisted" which will hide content from such lists, Perhaps also prevent search-engine parsing. You could have a "Meta book" (Admins only) with chapters (Allow all to view) to hold templates/other bits but have their contents unlisted. More hassle to build and for admins to set-up but adds a system-wide feature that could be used for other bits and makes chapters a little more unique. Just throwing out ideas though. I'll have a think. Feedback welcomed and appreciated.
Author
Owner

@Nebucatnetzer commented on GitHub (Feb 5, 2019):

Would the meta book be optional for templates?
I'm asking because I usually have two different users for myself on my systems.
A normal one for daily usage and an admin one for changing system settings and the likes.
Creating templates would in my case fall into the first category since creating content would be something I do with the normal user.

The other ideas sound really great however.

@Nebucatnetzer commented on GitHub (Feb 5, 2019): Would the meta book be optional for templates? I'm asking because I usually have two different users for myself on my systems. A normal one for daily usage and an admin one for changing system settings and the likes. Creating templates would in my case fall into the first category since creating content would be something I do with the normal user. The other ideas sound really great however.
Author
Owner

@ssddanbrown commented on GitHub (Feb 6, 2019):

@Nebucatnetzer Yeah, The "Meta Book" is only an example of how I'd imagine a lot of admins would do the set-up. You'd be free to set whatever permissions you'd want on it.

@ssddanbrown commented on GitHub (Feb 6, 2019): @Nebucatnetzer Yeah, The "Meta Book" is only an example of how I'd imagine a lot of admins would do the set-up. You'd be free to set whatever permissions you'd want on it.
Author
Owner

@Nebucatnetzer commented on GitHub (Feb 6, 2019):

Ah that would be great :)

Dan Brown writes:

@Nebucatnetzer Yeah, The "Meta Book" is only an example of how I'd imagine a lot of admins would do the set-up. You'd be free to set whatever
permissions you'd want on it.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@Nebucatnetzer commented on GitHub (Feb 6, 2019): Ah that would be great :) Dan Brown writes: > @Nebucatnetzer Yeah, The "Meta Book" is only an example of how I'd imagine a lot of admins would do the set-up. You'd be free to set whatever > permissions you'd want on it. > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub, or mute the thread.
Author
Owner

@BWMURPHY commented on GitHub (Feb 28, 2019):

We have three teams using our Stack: Account, Dev, and QA. They all have their own Shelves.

I like the proposal as is, as I am in charge of document control, so being able to create an un-shelved book and restrict it to myself would make it where others can't edit the templates, but would be free to use the templates when creating pages in books on their shelves. That would be extremely useful.

@BWMURPHY commented on GitHub (Feb 28, 2019): We have three teams using our Stack: Account, Dev, and QA. They all have their own Shelves. I like the proposal as is, as I am in charge of document control, so being able to create an un-shelved book and restrict it to myself would make it where others can't edit the templates, but would be free to use the templates when creating pages in books on their shelves. That would be extremely useful.
Author
Owner

@puffinmaster commented on GitHub (Mar 17, 2019):

One feature that would be nice to have implemented but is probably a pain to create is to have a "live" template. What I mean by that is any edits that happen on the master page/template is updated across all pages that are templated off of it.

@puffinmaster commented on GitHub (Mar 17, 2019): One feature that would be nice to have implemented but is probably a pain to create is to have a "live" template. What I mean by that is any edits that happen on the master page/template is updated across all pages that are templated off of it.
Author
Owner

@kondan1805 commented on GitHub (Mar 21, 2019):

pump really would love to see this feature

@kondan1805 commented on GitHub (Mar 21, 2019): *pump* really would love to see this feature
Author
Owner

@DerekFroese commented on GitHub (Jul 18, 2019):

This would be wonderful, any word on ETA?

@DerekFroese commented on GitHub (Jul 18, 2019): This would be wonderful, any word on ETA?
Author
Owner

@ssddanbrown commented on GitHub (Aug 17, 2019):

Since #1527 has been merged the core proposal for this is now in master so I'll therefore close this.

This feature will be part of the next release, v0.27

@ssddanbrown commented on GitHub (Aug 17, 2019): Since #1527 has been merged the core proposal for this is now in master so I'll therefore close this. This feature will be part of the next release, v0.27
Author
Owner

@DarkSky77 commented on GitHub (Aug 12, 2021):

Are there any plans for a templating function for Books ?

@DarkSky77 commented on GitHub (Aug 12, 2021): Are there any plans for a templating function for Books ?
Author
Owner

@ssddanbrown commented on GitHub (Aug 12, 2021):

Are there any plans for a templating function for Books ?

@DarkSky77 nothing active but there is a previous request to copy books within #1123

@ssddanbrown commented on GitHub (Aug 12, 2021): > Are there any plans for a templating function for Books ? @DarkSky77 nothing active but there is a previous request to copy books within #1123
Author
Owner

@DarkSky77 commented on GitHub (Aug 13, 2021):

Are there any plans for a templating function for Books ?

@DarkSky77 nothing active but there is a previous request to copy books within #1123

is there a chance that it come in neare future?

@DarkSky77 commented on GitHub (Aug 13, 2021): > > Are there any plans for a templating function for Books ? > > @DarkSky77 nothing active but there is a previous request to copy books within #1123 is there a chance that it come in neare future?
Author
Owner

@ssddanbrown commented on GitHub (Aug 14, 2021):

@DarkSky77 Not on my list to do anytime soon, Is a bit of a chunky feature for the relatively limited request for it. Add a 👍 reaction to the original post in #1123 to show support.

@ssddanbrown commented on GitHub (Aug 14, 2021): @DarkSky77 Not on my list to do anytime soon, Is a bit of a chunky feature for the relatively limited request for it. Add a :+1: reaction to the original post in #1123 to show support.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#120