Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Templating System #129

Open
davidPilkington opened this issue Jun 17, 2016 · 21 comments

Comments

@davidPilkington
Copy link

commented 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

@bridgeyuwa

This comment has been minimized.

Copy link

commented 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.

@ssddanbrown

This comment has been minimized.

Copy link
Member

commented 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.

@bridgeyuwa

This comment has been minimized.

Copy link

commented 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

@LeDistordu

This comment has been minimized.

Copy link

commented Jul 19, 2016

+1

1 similar comment
@raisoftware

This comment has been minimized.

Copy link

commented Aug 3, 2016

+1

@Shackelford-Arden

This comment has been minimized.

Copy link

commented Nov 30, 2016

+1

@mgjohansen

This comment has been minimized.

Copy link

commented May 17, 2017

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

@bcc-sysops

This comment has been minimized.

Copy link

commented Feb 17, 2018

+1

@jspaans91

This comment has been minimized.

Copy link

commented Mar 28, 2018

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

@skluthe

This comment has been minimized.

Copy link

commented Apr 19, 2018

Any news on this?

@ssddanbrown

This comment has been minimized.

Copy link
Member

commented 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.

@Nebucatnetzer

This comment has been minimized.

Copy link

commented Jan 31, 2019

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

@davidPilkington

This comment has been minimized.

Copy link
Author

commented Jan 31, 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.

@Nebucatnetzer

This comment has been minimized.

Copy link

commented 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.

@ssddanbrown ssddanbrown added this to the v0.27.0 milestone Feb 4, 2019

@ssddanbrown

This comment has been minimized.

Copy link
Member

commented Feb 4, 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.

@Nebucatnetzer

This comment has been minimized.

Copy link

commented 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.

@ssddanbrown

This comment has been minimized.

Copy link
Member

commented Feb 5, 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.

@Nebucatnetzer

This comment has been minimized.

Copy link

commented Feb 6, 2019

@BWMURPHY

This comment has been minimized.

Copy link

commented 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.

@puffinmaster

This comment has been minimized.

Copy link

commented 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.

@kondan1805

This comment has been minimized.

Copy link

commented Mar 21, 2019

pump really would love to see this feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.