Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-03-12 20:59:10

snkhan
Member
From: Leicester, UK.
Registered: 2004-07-20
Posts: 57
Website

Category link help

Hi guys,

Diagnostic Information
<code>
Textpattern version: 4.0.3 (r1188)
last_update: 2006-01-08 16:51:08/2006-01-08 16:46:12
Document root: /usr/local/psa/home/vhosts/thekhans.me.uk/httpdocs
$path_to_site: /usr/local/psa/home/vhosts/thekhans.me.uk/httpdocs/journal
Textpattern path: /usr/local/psa/home/vhosts/thekhans.me.uk/httpdocs/journal/textpattern
Permanent link mode: id_title
open_basedir: /usr/local/psa/home/vhosts/thekhans.me.uk/httpdocs:/tmp
upload_tmp_dir: /usr/local/psa/home/vhosts/thekhans.me.uk/httpdocs/temp
Temp folder: /usr/local/psa/home/vhosts/thekhans.me.uk/httpdocs/journal/textpattern/tmp
Site URL: www.thekhans.me.uk/journal
PHP version: 4.4.2
Register globals: 1
server_time: 2006-03-12 20:49:08
MySQL: 4.1.11
Locale: en_GB.ISO_8859-1
Server: Apache/1.3.33 (Unix) mod_python/2.7.10 Python/2.2.2 mod_gzip/1.3.26.1a mod_perl/1.29 mod_throttle/3.1.2 PHP/4.4.2 FrontPage/5.0.2.2635 mod_ssl/2.8.22 OpenSSL/0.9.7e
Apache version: Apache/1.3.33 (Unix) mod_python/2.7.10 Python/2.2.2 mod_gzip/1.3.26.1a mod_perl/1.29 mod_throttle/3.1.2 PHP/4.4.2 FrontPage/5.0.2.2635 mod_ssl/2.8.22 OpenSSL/0.9.7e
php_sapi_mode: apache
os_version: FreeBSD 4.9-RELEASE-p13

.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

————————————
</code>

The problem

When in single article view, a paragraph is output containing the article meta data (for instance, the post time, post category etc). The post category is in itself a link to articles within that category. However when clicking on this link, the subsequent pages lack CSS styling (because the URL to the CSS file is incorrect).

Subsequently, any relative links also break, so an original link of ../../contact.php becomes http://www.thekhans.me.uk/journal/category/contact.php

I have read the FAQ’s and searched the forums, but was unable to find anything to correct the error, so any help would be much appreciated!

Thanks,

Saj

Offline

#2 2006-03-12 21:54:21

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Category link help

You’ve left out the vital info: what is url of your stylesheet that you are using?

I don’t follow the second problem?

Offline

#3 2006-03-12 22:32:25

snkhan
Member
From: Leicester, UK.
Registered: 2004-07-20
Posts: 57
Website

Re: Category link help

Hi Mary,

The url to the journal is http://www.thekhans.me.uk/journal/
I’m currently using PHP to select the relevant CSS file (a different css sheet is used for every day of the week).

Example problem page:
http://www.thekhans.me.uk/journal/33/team-outing-at-nandos

Clicking on ‘Life’ on the right hand side leads to a unstyled page, also all relative links are prefixed with ‘journal/category’

Also all perma pages have incorrect links (try clicking on the main items on the top of the page).

Any ideas?

Saj

Last edited by snkhan (2006-03-12 22:33:20)

Offline

#4 2006-03-12 22:57:00

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

Re: Category link help

You’re using relative URLs for your stylesheets. This won’t work, as you’ve discovered. FAQ.


Alex

Offline

#5 2006-03-13 21:49:21

snkhan
Member
From: Leicester, UK.
Registered: 2004-07-20
Posts: 57
Website

Re: Category link help

Is there not a <txt:root /> command that can be used that will insert the main domain URL? I know a variation exits which inserts the root domain plus the install directory.

Saj

(Edit: updated to display your posted code properly. :) -Mary)

Offline

#6 2006-03-13 21:51:42

snkhan
Member
From: Leicester, UK.
Registered: 2004-07-20
Posts: 57
Website

Re: Category link help

<base href="http://example.com/"> worked perfectly, so thanks for that!

(Edit: updated to display your posted code properly. :) -Mary)

Offline

#7 2006-03-13 22:05:10

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Category link help

Is there not a command that can be used that will insert the main domain URL?

Yes: <txp:site_url />

Offline

#8 2006-03-13 23:34:48

snkhan
Member
From: Leicester, UK.
Registered: 2004-07-20
Posts: 57
Website

Re: Category link help

^ Huh? Thanks for correcting the code :-)

Offline

#9 2006-03-13 23:43:53

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Category link help

Bah. Fixed yours then screwed up mine…

Offline

#10 2006-03-13 23:48:13

snkhan
Member
From: Leicester, UK.
Registered: 2004-07-20
Posts: 57
Website

Re: Category link help

Doesn’t that return the root URL plus the install directory? At present it returns http://www.thekhans.me.uk/journal, I wondered whether it can amended to return http://www.thekhans.me.uk ?

Thanks Mary :-)

Last edited by snkhan (2006-03-13 23:48:34)

Offline

#11 2006-03-14 00:46:57

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Category link help

Yes, it returns the url where Textpattern is installed. Typically people power their whole site with Textpattern, so that tag gives you what you want.

Offline

Board footer

Powered by FluxBB