Jump to content
TNG Community
pipsi

"BACK TO TOP" button

Recommended Posts

Newfloridian

I also use template 4 (in TNG10.1.3) I have a large number of Feature Articles (formatted in either 2 or 3 columns). Although only a text link rather than an image, I put a link at the bottom of the first column which reads "Continued in column 2..."  and a similar link reading "Return to Top of Page" at the bottom of the final column. I guess you could modify this to create a button.

The code for the bottom of column 1 link is:

<p><a href="#" title="Return to top of page" onclick="window.scrollTo(0,0);return false;"><em>Continued in column 2...</em></a></p>

To see it action you could try:

Exodus II - All sorts of Liquorish

Alan

 

 

 

Share this post


Link to post
Share on other sites
pipsi

THANK you Alan! I'll implement that!

Greetings from Vienna, Ingrid

Share this post


Link to post
Share on other sites
Newfloridian

Hi Ingrid

If you are going to use this frequently and want to make it more flexible (I noticed your site is in three languages), you could try the following amendment. For this you will need to use text variables and be comfortable using the cust_text.php files in your languages of choice. I'm going to use the "Continue in Column 2" example here but you would just change the text for "Return to Top of Page" and show you just the English version.

In your document, change the link to:

<p><a href="#" title=<?php echo $text['toppage']; ?> onclick="window.scrollTo(0,0);return false;"><em><?php echo $text['topcol2']; ?></em></a></p>

(For clarification, what shows in the title= phrase is what appears in the mouseover. What appears at the end of the line is what appears in the link.

In your usual cust_text.php file (there is one in the /languages/English folder and one in the langiages/English-UTF8 folder, add these two lines:

$text['toppage'] = "Return to Top of Page";
$text['topcol2'] = "Continued in Column 2 ...";

These will provide a default English link on your pages. If you want to make it multilingual, add those two lines to the cust_text.php files of your chosen languages but put a relevant translation for "Return to Top of Page" and "Continued in Column 2..." into each.

Obviously if you are only using Return to Top of Page, you would replace the second expression in the line in your document to $text['toppage'];

Alan

 

 

 

Share this post


Link to post
Share on other sites
pipsi
vor 29 Minuten schrieb Newfloridian:

 

In your document, change the link to:

 

 

 

I confess, my brother has set up the site and only he knows this stuff.

I have no "document", but an album, "Ship Manifests". The contents are single documents (Passenger Manifest) and single photos (of the respective ship), each loaded into the album (via add media). 
so I don't know which link to change where, as described by you.

I must clearly ask my brother for help 😉 - I will send him your instructions.
Thank you very much!

Ingrid

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×