Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2006-02-20 21:43:07

Raven
Member
Registered: 2006-01-25
Posts: 21

Re: NOOB question about toplinks

Hi again,

it is a default installation, so the URLs are set to messy. I haven’t changed the basic configuration in any way apart from installing the graphics-wise adapted Connections theme.

I also have a problem with what Alex gave me. I do not want to change the theme/template, I want to USE it. I don’t have the time to set up, conceive and debug a new theme. So how would those tags of Alex help me get this theme working if I can’t paste the URLs where that placeholder is. What I want to know is what to put THERE, where the “#” is. And I need to know what URLs the articles, files and static pages have to do that.

My diagnostics function says everything works. Here’s the relevant parts of the file:

Textpattern version: 4.0.3 (r1188)
last_update: 2006-02-15 07:08:31/2005-12-26 17:49:56
Document root: /home2/xyz/public_html/ex
$path_to_site: /home2/xyz/public_html/ex
Textpattern path: /home2/xyz/public_html/ex/textpattern
Permanent link mode: messy
Temp folder: /home2/xyz/public_html/ex/textpattern/tmp
Site URL: ex.xyz.com
PHP version: 4.4.2
Register globals: 1
server_time: 2006-02-20 15:35:34
MySQL: 4.1.13-standard
Locale: en_GB.UTF-8
Server:
php_sapi_mode: cgi
os_version: Linux 2.4.22

.htaccess file contents:
————————————
#DirectoryIndex index.php index.html
#Options +FollowSymLinks
#RewriteBase /relative/web/path/

<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) – [PT,L]

RewriteRule ^(.*) index.php </IfModule>

#php_value register_globals 0

————————————

Charset (default/config): latin1/utf8
character_set_client: utf8
character_set_connection: utf8
character_set_database: latin1
character_set_results: utf8
character_set_server: latin1
character_set_system: utf8
character_sets_dir: /usr/share/mysql/charsets/
18 Tables: OK

Greetings

R

Offline

#14 2006-02-20 21:52:38

KurtRaschke
Plugin Author
Registered: 2004-05-16
Posts: 275

Re: NOOB question about toplinks

Replace your code that looks like <ul id="topnav">...</ul> with:

<ul id="topnav">
<txp:section wraptag="li" link=1 title=1 name="about" />
<txp:section wraptag="li" link=1 title=1 name="archives" />
<txp:section wraptag="li" link=1 title=1 name="links" />
<txp:section wraptag="li" link=1 title=1 name="contact" />
</ul>

Okay? Just do it. You are going to have to change the theme in some way to get it working; the easiest thing to do is use the tags which are built-in to Textpattern.

-Kurt

Last edited by KurtRaschke (2006-02-20 21:53:01)


kurt@kurtraschke.com

Offline

#15 2006-02-20 21:54:55

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: NOOB question about toplinks

R,

You have two choices:

1. Replace the <ul><li>... navigation block in your template with code that actually works, or

2. Keep using the code you have, that doesn’t work.

Up to you.

So, for the third time, try this code, exactly as it is here:

<ul>
<txp:section wraptag="li" link=1 title=1 name="about" />
<txp:section wraptag="li" link=1 title=1 name="archives" />
<txp:section wraptag="li" link=1 title=1 name="links" />
<txp:section wraptag="li" link=1 title=1 name="contact" />
</ul>

The only thing you might have to change are the section names.

That’s it. No <a href=...>, no #, nothing else, just that.

Also: we can’t help you if we don’t understand what the problem is. You still haven’t described it clearly – it’s not clear whether the links are incorrect, whether they are correct but the destination pages are displaying the content, or something else is going on.


Alex

Offline

#16 2006-02-20 22:15:06

Raven
Member
Registered: 2006-01-25
Posts: 21

Re: NOOB question about toplinks

Hi Alex,

just how often do I have to reiterate:

I do NOT know which URLs are my sections, articles and static pages. I can’t call them directly IN ANY WAY! Not directly, nor any other conceivable way. I can’t rightclick any of the IDs either in admin, it doesn’t give me correct links, just those of the admin interface.

As I do not know what these URLs are, I can’t put them anywhere, as this template – which obviously works for quite a few people – asks me to. And I checked, the other themes I download which employ a like top navigation call to links in the same way. I couldn’t fill these either, as … I don’t know which URLs to put there.

As to your code – it doesn’t work either, it simply mangles the top navigation.

That’s all which is there to explain – I posted the diagnostics results above. There isn’t any more, I don’t have little red devils dancing tango on the pages or a couple of fangs or whatever one might expect else…. sigh

R

Offline

#17 2006-02-20 22:42:08

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: NOOB question about toplinks

Raven,

Your sections are listed under presentation > sections in the Textpattern admin interface.

The reason we keep telling you to use the <txp:section ...> code is that you don’t have to know what the URLs are. Textpattern will make the correct link for you. All you have to do is make sure that the section names are correct (i.e. the name="foo" part of each <txp:section ... /> tag matches the Section name from presentation > sections).

As I do not know what these URLs are, I can’t put them anywhere, as this template – which obviously works for quite a few people – asks me to. And I checked, the other themes I download which employ a like top navigation call to links in the same way. I couldn’t fill these either, as … I don’t know which URLs to put there.

Perhaps you should ask the theme author. The <txp:section ...> tag is the correct way to make navigation links in Textpattern. If you want to do it differently, we can’t help you.

This FAQ explains how static pages work. You create a section for each page. This FAQ explains what sections are and how they relate to URLs.

As to your code – it doesn’t work either, it simply mangles the top navigation.

Please show us what it does: what code you are using, and what HTML it produces. We don’t have telepathic access to your screen.

This FAQ explains how to post template code and HTML here.

Last edited by zem (2006-02-20 22:45:53)


Alex

Offline

#18 2006-02-20 22:52:33

KurtRaschke
Plugin Author
Registered: 2004-05-16
Posts: 275

Re: NOOB question about toplinks

Raven,

I suspect that part of the reason that Alex’s code “mangles” your navigation is that your original <ul> was styled with id="topnav", which would have caused it to receive a certain CSS style. Without that parameter, the list will be unstyled. Adding that to the <ul> in the code Alex gives above should address that issue.

-Kurt


kurt@kurtraschke.com

Offline

#19 2006-02-21 06:16:57

Raven
Member
Registered: 2006-01-25
Posts: 21

Re: NOOB question about toplinks

Hi again,

I pasted Alex code instead of the Connections theme’s top navigation and it does NOT (insert your favorite swear words here by now!) create any live link or whatever. It sits there, mangles the top navigation (insofar that I now have a bulleted vertical list of nav links), looks in source code as it looks here on the forum and when you try clicking it nothing happens but a reload of the front page.

I begin to wonder how often I have to say this again and again until you guys believe what I say. I’m a firsttimer with Textpattern, but certainly not with HTML, CMS and PHP web apps. When I say I just get a reload of the same page, I just get a reload of the same page. Period.

Now…

Can someone PUHLEAZE tell me at least how base URLs of Textpattern look when called?

In e.g. WP a category will have

http://domain.com/?cat=1

An archive will have

http://domain.com/?m=200511

A single static page

http://domain.com/?page_id=16

In Nucleus you get an archivelist by calling

http://domain.com/index.php?archivelist=1

A contact page by using this

http://domain.com/?memberid=1

And a category list through this

http://domain.com/index.php?catid=10&blogid=1

Serendipity calls an archive this way

http://domain.com/index.php?/archives/2006/02.html

and a single entry in this manner

http://domain.com/index.php?/archives/3-article.html

As is clearly obvious, they all use a different SYNTAX.

Without being able to call anything but the darn front page (which has a simple “index.php”) and a single article page (which has “index.php?id=1”) I can’t even begin to guess what a correct URL of Textpattern looks like for a section, a category or a static page. Without any idea what to use as a base URL I do not even have a chance to LOOK AT a section or category outside of the admin interface aaaaaaaaaaas… as I said the navigation doesn’t work so far! Never mind ID numbers, those I can pull from the database using PHPmyadmin…

So could someone please finally post basic URL syntax of sections, categories and static pages as it should look like with messy URLs?

As to the failing navigation, I have read up on .htaccess problems, and I guess that Kurt may have his finger on the basic problem. Textpattern runs for this here installation on a subdomain with a redirected main domain. This hasn’t been so far any problem whatsoever for several CMS (Nucleus, WP, Joomla, Websitebaker, Typo, PHPwebsite, Serendipity, bmachine… to name but a few which run this way on the same server). Possibly it is a problem for Textpattern.

What I read so far hasn’t helped me pinpoint the problem though, I have no idea what to change in the .htaccess file.

Greetings

R

Offline

#20 2006-02-21 06:27:04

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: NOOB question about toplinks

I pasted Alex code instead of the Connections theme’s top navigation and it does NOT (insert your favorite swear words here by now!) create any live link or whatever. It sits there, mangles the top navigation (insofar that I now have a bulleted vertical list of nav links), looks in source code as it looks here on the forum and when you try clicking it nothing happens but a reload of the front page.

Again: please post the HTML output here. Or a link to your site.

Can someone PUHLEAZE tell me at least how base URLs of Textpattern look when called?

It depends on how you’ve configured Textpattern. That’s why we suggest using the built-in tags that are designed for this purpose. In messy URL mode, probably http://ex.xyz.com/?s=mysection.

What I read so far hasn’t helped me pinpoint the problem though, I have no idea what to change in the .htaccess file.

Again: we can’t help if you won’t give us the information we need.


Alex

Offline

#21 2006-02-21 06:42:40

Raven
Member
Registered: 2006-01-25
Posts: 21

Re: NOOB question about toplinks

Hi,

the source code:

<ul>
<li><a href="http://ex.xyz.com/index.php">default</a></li>
<li><a href="http://ex.xyz.com/index.php?s=about">about</a></li>
<li><a href="http://ex.xyz.com/index.php?s=article">article</a></li>
<li><a href="http://ex.xyz.com/index.php?s=contact">contact</a></li>
</ul>

The result of any link when clicked:

http://ex.xyz.com/index.php

R.

Last edited by zem (2006-02-21 06:48:51)

Offline

#22 2006-02-21 07:03:26

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: NOOB question about toplinks

The URLs in those links are correct. You’ll need to adjust for your CSS, as Kurt says.

I can’t say much more about what’s displayed on each of those pages, since you’re not giving us real links.

Most likely, the page template you’re using on each of those section pages contains the wrong code, or code that will always display the same content regardless of the url (article_custom being the most common mistake). Maybe you don’t have articles in any of those sections. All I can do is guess.

You can put the following line in a prominent place in your page template:

<h1>This is the <txp:section /> section</h1>

If the section it displays matches the one in the URL, your URLs are working fine, and Textpattern is simply doing what it’s told.

This FAQ explains some things to look for. In particular, check that the page really is using the template you think it is (see the Tag Trace part at the bottom).


Alex

Offline

#23 2006-02-23 09:39:42

Raven
Member
Registered: 2006-01-25
Posts: 21

Re: NOOB question about toplinks

Hi again,

just to clear this up – nope, the URLs weren’t working fine, the double re-routing of a domain and a subdomain at the same time apparently wasn’t much to Textpattern’s liking. After the basic serverside routing/DNS for that specific domain and subdomain was changed Textpattern started to – largely – behave as it should and even supports clean URLs now. And the theme now – mostly – works as it should as well.

So essentially Kurt’s guess was pretty much on target, it just hadn’t much to do with the .htaccess file.

R.

Offline

Board footer

Powered by FluxBB