How to add an 'Edit' button on Mediumish theme?

Post Reply
User avatar
Renaud
Sr. Bludit
Posts: 48
Joined: Tue Feb 19, 2019 9:08 pm

I tried to copy and paste the following Blekathlon Theme code after he H1, but it does not work :

Code: Select all

<?php if($login->isLogged()) if($canEdit = checkRole(array('admin', 'editor'))):?>
	<a href="<?php echo HTML_PATH_ADMIN_ROOT.'edit-content/'.$page->slug() ?>" style="float:right" target="_blank">
		<svg class="icon" viewbox="0 0 32 32">
			<use xlink:href="#icon-pencil"></use>
		</svg>
		<span>Edit</span>
	</a>
<?php endif; ?>
It's a cool feature, is it possible :?:
User avatar
bayerberg
Master Bludit
Posts: 141
Joined: Wed Jun 07, 2017 1:05 pm
Location: London, UK
Has thanked: 7 times
Been thanked: 10 times
Contact:

you can have that functionality by using https://gum.co/adminbar. if you are an admin edit button will appear in the bar on any editable page
bludit plugins and themes - makeitblu | I do things, check them out on behance and dribbble.
User avatar
Renaud
Sr. Bludit
Posts: 48
Joined: Tue Feb 19, 2019 9:08 pm

OK, thank you very much.
User avatar
Renaud
Sr. Bludit
Posts: 48
Joined: Tue Feb 19, 2019 9:08 pm

bayerberg wrote: Thu Feb 21, 2019 10:18 am you can have that functionality by using https://gum.co/adminbar. if you are an admin edit button will appear in the bar on any editable page
Could you tell me how to make it less high?
I added "padding-top: 2px; padding-bottom: 2px;" for #admin-strip, but it's just the black strip.

Thank you.
User avatar
Renaud
Sr. Bludit
Posts: 48
Joined: Tue Feb 19, 2019 9:08 pm

In fact it's OK, thank you.
Post Reply