Top Link #top - fix in post

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
baby2boy
Posts: 12
Joined: Fri 23. Sep 2005, 00:10

Top Link #top - fix in post

Post by baby2boy »

I have searched the forum but cannot find a solution. Every time myself or my client click the top link it goes to http://www.webaddress.net/#top which shows the index page.

Is it just us and our browsers or is there a bonefide issue here?

Many thanks in advance.
b2b

Frold updated topic
Pappnase

Post by Pappnase »

hello


please post the link of the page! so we can take a look!
baby2boy
Posts: 12
Joined: Fri 23. Sep 2005, 00:10

Post by baby2boy »

Thanks for your reply, I found a solution late last night.

I updated file content.article.inc.php to the undermentioned. Perhaps someone could tell me a proper way of doing it instead of the crude hack :roll:

CHANGED TO

Code: Select all

'.$_SERVER["QUERY_STRING"].'.phtml#top">'.
so the full code below

Code: Select all

$CNT_TMP .= $template_default["article"]["top_sign_before"];
						$CNT_TMP .= '<a href="'.$_SERVER["QUERY_STRING"].'.phtml#top">'.$template_default["article"]["top_sign"].'</a>';
						$CNT_TMP .= $template_default["article"]["top_sign_after"];
					} else {
						$CNT_TMP .= '<br><a href="'.$_SERVER["QUERY_STRING"].'.phtml#top">'.$template_default["article"]["top_sign"].'</a>';
					}
				}
User avatar
Oliver Georgi
Site Admin
Posts: 9934
Joined: Fri 3. Oct 2003, 22:22
Location: Dessau-Roßlau
Contact:

Post by Oliver Georgi »

if <a href="#top">jjj</a> is problematic for you - don't know why, because it is a correct way, you can use an own replacement command in a php file located in frontend_render like

Code: Select all

<?php

$content['all'] = str_replace('"#top"', '"index.php?'.$_SERVER["QUERY_STRING"].'#top"', $content['all']);

?>

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn
Post Reply