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

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

Wed Feb 20, 2019 6:06 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: 99
Joined: Wed Jun 07, 2017 1:05 pm
Contact:

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
bludit plugins and themes - makeitblu | I do things, check them out on behance | check out startups undiluted - london's startup ecosystem
User avatar
Renaud
Ssr. Bludit
Posts: 21
Joined: Tue Feb 19, 2019 9:08 pm

Thu Feb 21, 2019 10:29 am

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

Thu Feb 21, 2019 10:48 am

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
Ssr. Bludit
Posts: 21
Joined: Tue Feb 19, 2019 9:08 pm

Thu Feb 21, 2019 10:53 am

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