Recent Topics

1 Jun 15, 2006 14:48    

Hello there,

I just recently installed this blog on my site, and it's great, but I have one small problem.

On each of my pages I have a php include for the header and footer. These go into the blog just fine with no problems except one. In the header I have

<a name="top" href="">image</a>

And the footer has

<a href="#top">Go to Top</a>

This is, of course, so that every page in my site automatically has a top link without needing to hard code it into every page. It works everywhere execpt the Blog.

When that link is clicked from the Blog index, it sends me to

Is there a way to get that link to send me to the top of the blog index page instead of the skins/custom folder without making a seperate include for JUST the blog? I've tried passing a variable from the blog index to my include, and then having the include use an if statment to change the link to, but the variable just won't pass to the include. What am I missing?


2 Jun 15, 2006 15:02

This was posted elswhere on this forum..

Here's what I have and it works across all pages..

<a name="top" id="top"></a>

Then in my footer I have..

$url = sprintf("%s%s%s","http://",$HTTP_HOST,$REQUEST_URI);
<a href="<?php echo $url ?>#top" title="Jump to Page Top">Top</a>

I may help you.

3 Jun 15, 2006 15:25

Thanks John,

I did a quick scan of the forums but didn't see anything, maybe I missed it.

I'm not sure what the problem is, but your code isn't working for me either. When I try it, it works on all my pages except the blog index page.

On the blog index, it redirects me to

5 Jun 15, 2006 16:34

Bah! When I try to use the alternative method, I get a function undefined error.

Is that regenerate_url() php version specific? I'm using 4.4.1

This is driving me nuts. lol

Thanks for the info though, it cleans up the code for the rest of my site quite nicely.

6 Jun 15, 2006 16:42

duskrider wrote:

Is that regenerate_url() php version specific?

No because it is not a php function, but it is probably only available in certain versions of b2evolution.

Form is loading...