"Back" button in blog posts


#1

This is just a little usability improvment but I like it, to have a “Back” button inside blog posts.

The first thing we need to do, is to edit inc/tags/blog.php
Go to line 83 and enter this 3 lines of code:

 echo "<div id='blog'>";
 echo "<button onclick='history.back()'>$lang_blog_back_button</button>";
 echo "</div>";

As you can see I have used a $lang string, so the next file we need to edit is: admin/inc/lang/deutsch.php

  • Use english.php or whatever language you are using (in my case deutsch.php)

Okay, here we need to add another language string $lang_blog_back_button
Place it where you want, I did it in the Blog section around line 75

$lang_blog_back_button = 'Zur&uuml;ck';

Now we have a working “Back” button inside the blog article.
The last thing is to style it, at the default theme I have used the same style as the submit button in the contact form.
Open template/css/master.css and add the following style:

#blog button {
	padding: 4px 14px;
	background-color: #999;
	font-size: 14px;
	color: white;
}

Okay, that’s it! :slight_smile:
Could also be a feature request for one of the next versions. :wink:

Here is how it looks like:


#2

Nice work!
Here is a translation for Pulse-4.7 (CZ.SK, PL, HU + button).
Pulse-4.7(SK,CZ,PL,HU+button).rar
Hi.
Robo


#3

@Oliver
Nice idea, thanks for it Oliver!!!
GREAT tip
works and looks nice as well

Sandy


#4

@IvaRo Thanks for the translation, now it should be implemented in the core of Pulse :wink:


#5

@sandy Wow, looks great on your blog, thanks for using it.


#6

This has been needed for a while… going to squeeze it in to 4.7 and do another build and hopefully release today. Great work @Oliver :tada::zap:

Thanks @sandy for testing it and @IvaRo for your as always, really quick translation work! The language files wouldn’t be the same without you :slight_smile:

Incidentally, great video too Oliver and any videos that you (or anyone) makes that are tutorial based - if you @pulse_cms on Twitter we can see them then add them to our YouTube Playlist and they’ll appear here:

You’ve got 2 in there now Oliver :wink:

Edit: Pulse 4.7 is live:
https://forum.pulsecms.com/t/pulse-4-7-is-here-and-the-best-version-of-pulse-yet/499/2


Pulse 4.7 is here and the best version of Pulse yet ⚡️
#7

Cool, thanks Michael. That was fast! :+1:


#8

Button back was a good deal.
When you open the Block 2, visible button you back.
In this case, it would be logical to have a back button you click on (next).

Pray tell, does anyone like the script?
well thank you
Robo

I already you find this in a post user / Dirk

Dirk Thank you!


#9

Back button is now there in version update 1.1.4 of Pulse CMS Stacks: https://rapidweavercommunity.com/addons/stacks/pulse-cms-stack


closed #10