Go to blog entry after editing?

This is the right place to report general bugs, make suggestions or ask for help.
Post Reply
User avatar
virtualsky
Posts: 67
Joined: Thu Mar 11, 2021 4:50 am
Location: Saskatchewan, Canada
Contact:

Go to blog entry after editing?

Post by virtualsky » Tue Jul 25, 2023 3:56 pm

How difficult would it be (aka would it be possible?) to add a link that would take me directly to the blog entry that I had just created/updated in the editor?

Right now, if I want to go to the blog entry after I'm done editing it, I click on HOME (in the top right corner of the web page) and then click on the blog entry in the index page. It would be really convenient if I could just click on a link, from the editor page, to take me right here, rather than having to go the blog's Home/Index page first.

If this option already exists, I'm missing it.

Any recommendations?
It ain't retro to me.... it's just how I live!
https://www.thegrove.in.nf/retroblog

eagleman
Posts: 201
Joined: Sat Mar 02, 2019 12:10 pm

Re: Go to blog entry after editing?

Post by eagleman » Tue Jul 25, 2023 8:48 pm

Have you already tried the Preview button into the editor?
But probably you want to see the entry preview with the blog theme.
We have to wait for any further advice.

User avatar
virtualsky
Posts: 67
Joined: Thu Mar 11, 2021 4:50 am
Location: Saskatchewan, Canada
Contact:

Re: Go to blog entry after editing?

Post by virtualsky » Tue Jul 25, 2023 11:28 pm

eagleman wrote: โ†‘Tue Jul 25, 2023 8:48 pm Have you already tried the Preview button into the editor?
But probably you want to see the entry preview with the blog theme.
We have to wait for any further advice.
Hey, thanks, eagleman! Yes, I use the Preview, but you got it right, I'd like to go right to the blog entry that the visitors see.
It ain't retro to me.... it's just how I live!
https://www.thegrove.in.nf/retroblog

User avatar
Arvid
FlatPress Coder
Posts: 583
Joined: Sat Jan 26, 2019 7:40 pm
Contact:

Re: Go to blog entry after editing?

Post by Arvid » Sat Mar 16, 2024 12:18 pm

Hi, sorry for being really late on this one. The solution is actually not too complicated.

In admin/panels/entry/admin.entry.write.tpl, just add this code to the list of "other options" (line 93 ff):

Code: Select all

<li><a href="{$id|link:post_link}" target="_blank">Open the entry</a></li>
It should then look like this:

Code: Select all

<div id="admin-otheroptions">
	<h2>{$panelstrings.otheropts}</h2>
		<ul>
<!-- this creates the link that opens the currently edited entry in a new browser tab -->
		<li><a href="{$id|link:post_link}" target="_blank">Open the entry</a></li>
<!-- that's it :) -->
		{if !isset($draft)}
			<li><a href="admin.php?p=entry&amp;entry={$smarty.get.entry}&amp;action=commentlist">
			{$panelstrings.commmsg}</a></li>
		{/if}
			<li><a href="admin.php?p=entry&amp;entry={$smarty.get.entry}&amp;action=delete">
			{$panelstrings.delmsg}</a></li>
		</ul>
</div>
Noteworthy: Since admin.entry.write.tpl is a default template, this change will be overwritten during an update.

All the best,
Arvid

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest