Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#13 2008-05-14 17:19:38
- Ruhh
- Member
- From: dakota dunes
- Registered: 2008-01-20
- Posts: 305
Re: anchors in tables?
I am actually using Firefox and upon clicking the link, it doesn’t go to the month being called. It goes to the top of the page.
<txp:Ruhh />
Offline
#14 2008-05-14 17:26:12
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: anchors in tables?
Is this a live site? Can we look at it? Because looking at your code I don’t see why it shouldn’t work. If not, can you post the html output of both the link to the archive page and the archive page itself?
Offline
#15 2008-05-14 17:33:03
- Ruhh
- Member
- From: dakota dunes
- Registered: 2008-01-20
- Posts: 305
Re: anchors in tables?
Ok, well this is the code for my page template named archive:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>tramway gone neon @ <txp:site_name /> » Archives</title>
<link rel="home" href="<txp:site_url />" />
<link rel="icon" href="<txp:site_url />favicon.ico" />
<txp:css format="link" />
<txp:output_form form="scripts" />
</head>
<body id="default-page">
<a name="top"></a>
<div id="layout"><txp:output_form form="layout" /></div>
<div id="sidebar3"><txp:article_custom limit="1" form="sidebar3" /></div>
<div id="navigate"><txp:output_form form="navigate" /></div>
<div id="content">
<txp:if_category>
<txp:article /><txp:else />
<txp:if_individual_article>
<table cellpadding="5px"><tr>
<td width="150px" valign="top"></td>
<td><txp:article_custom form="post_list" section="post" limit="99" /></td>
</tr></table>
<txp:article /><txp:else />
<table cellpadding="5px"><tr>
<td width="150px" valign="top"></td>
<td>
<txp:article_custom form="archive" limit="99" /><txp:output_form form="cat_menu" />
</td>
</tr></table>
</txp:if_individual_article>
</txp:if_category>
</div>
<div id="twitters" style="position:absolute;top:10px;right:10px;">
<txp:output_form form="twitter" />
</div>
<script type="text/javascript">gradualFader.init()</script>
</body>
</html>
Does that help? Or need to see some more?
<txp:Ruhh />
Offline
#16 2008-05-14 19:45:10
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: anchors in tables?
Actually I’d like to see the html output, not the entire page but just a part with one or two of the anchors in it.
And the html output of this code:
<a href="<txp:site_url />archive/2008#<txp:posted format="%B" />"><txp:posted format="%B %Y" /></a>
(You can strip your site url from it if you wish.)
Offline
#17 2008-05-14 20:13:31
- Ruhh
- Member
- From: dakota dunes
- Registered: 2008-01-20
- Posts: 305
Re: anchors in tables?
Ooh ok, well here is the html output of the anchor usage:
<h1>Archives</h1>
<br />
Organized by month:
<br />
<br />
• <a href="/archive/2008#May">May 2008</a>
<br />
• <a href="/archive/2008#April">April 2008</a>
<br />
• <a href="/archive/2008#March">March 2008</a>
<br />
• <a href="/2008#February">February 2008</a>
<br />
• <a href="/archive/2008#January">January 2008</a>
And then the html output of the results:
<h1>2008 Archive</h1><br /><br />
<a name="May" id="May"></a>
<h3>May</h3>
<font color="#666">13:</font> <a rel="bookmark" href="/post/tidy-up">Tidy up</a>
<br />
<font color="#666">07:</font> <a rel="bookmark" href="/post/fancy-the-shop">Fancy the shop</a>
<br />
<font color="#666">04:</font> <a rel="bookmark" href="/post/movunday">MOVunday</a>
<br />
Oh keep in mind both of them are contained within the tables.
Last edited by Ruhh (2008-05-14 20:14:54)
<txp:Ruhh />
Offline
#18 2008-05-14 21:52:52
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: anchors in tables?
Wait a minute, shouldn’t your output be
<a href="/archive/2008/#May">May 2008</a>
instead of
<a href="/archive/2008#May">May 2008</a>
(so with a slash after 2008)?
Offline
#19 2008-05-14 22:07:24
- Ruhh
- Member
- From: dakota dunes
- Registered: 2008-01-20
- Posts: 305
Re: anchors in tables?
No there is no slash. “2008” is an empty article set in the archive section.
<txp:Ruhh />
Offline
#20 2008-05-14 22:16:23
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: anchors in tables?
I see. In the meantime I tried the code on my test install, I changed your
<h1>2008 Archive</h1><br /><br />
<a name="May" id="May"></a>
<h3>May</h3>
to
<h1>2008 Archive</h1><br /><br />
<h3 id="May">May</h3>
put it in a table, and linked to it from another page with
<a href="/archive/2008#May">May 2008</a>
and it goes to the anchor nicely (tried it in two different browsers, Firefox and Konqueror). So I’m sorry, but I don’t know why it doesn’t work for you…
Offline
#21 2008-05-14 22:22:56
- Ruhh
- Member
- From: dakota dunes
- Registered: 2008-01-20
- Posts: 305
Re: anchors in tables?
I did that, too. :/ I have no clue why it is not working for me.
<txp:Ruhh />
Offline
#22 2008-05-14 22:36:11
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: anchors in tables?
Do other existing id’s work as an anchor? Like /archive/2008#content
?
Offline
#23 2008-05-14 23:04:41
- Ruhh
- Member
- From: dakota dunes
- Registered: 2008-01-20
- Posts: 305
Re: anchors in tables?
Nope. I tried every anchor link. They still go to the top of page and not to the top of the month name.
<txp:Ruhh />
Offline
Re: anchors in tables?
May be your page doesn’t have vertical scrollbars? If so, nothing will happen – browser cannot scroll page to desired anchor.
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline