Not logged in. · Lost password · Register
Forum: General Help and Support Templates and Layout RSS
Customizing the Edit button for an included page
Avatar
clh #1
Member since May 2016 · 79 posts
Group memberships: Members
Show profile · Link to this post
Subject: Customizing the Edit button for an included page
I frequently use the include plugin - in fact, it's common for a section to contain nothing but an include directive. The problem is that not only do I get two Edit buttons (one for the section, and one for the included page), but the Edit button for the included page is quite wide, because it displays the entire pagepath to the included page.

I can live with having two edit buttons, but is there any way to alter the style and content of include's edit button? I don't need to know the page name, let alone the full path, so a constant text for the button, and perhaps a distinct style, would be preferable.

Is there any way to do this?

I use Linux, the latest DokuWiki, and bootstrap3.
Avatar
turnermm (Moderator) #2
Member since Oct 2009 · 3885 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
See the
Show edit button
option in Configuration Manager.  You can choose to hide the edit button and then edit the included page separately.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
clh #3
Member since May 2016 · 79 posts
Group memberships: Members
Show profile · Link to this post
Thanks. At first I didn't like this solution, because I thought it would be confusing for the average contributor to edit included pages. However, upon reflection I realized that I used includes for (a) pulling automatically-generated and updated pages (e.g. database schema) into another, and (b) for boilerplate text I want to insert in multiple places. I don't want just anyone editing these! So hiding the Edit button was a perfect solution.
Avatar
turnermm (Moderator) #4
Member since Oct 2009 · 3885 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
Another way of handling this, by the way, is with ACL settings.  By limiting the included pages to read  only for @ALL, the edit buttons will be hidden to @ALL but they will show up for users who have write permission to the included pages.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
clh #5
Member since May 2016 · 79 posts
Group memberships: Members
Show profile · Link to this post
even better.
Avatar
clh #6
Member since May 2016 · 79 posts
Group memberships: Members
Show profile · Link to this post
I also had not previously noticed that the include directive supported a &noeditbutton option.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2017-10-24, 00:43:20 (UTC +02:00)