Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2007-05-07 06:19:42
- scdoody
- Member
- Registered: 2006-10-18
- Posts: 129
issue with image pathing
When I am on the homepage (index.php) of my blog – everything looks great. But, when I click the blog post title and go to the archive page, none of my images show up because the image paths are looking in the wrong location. How can I make image path links relative to the root image folder for the site – I think this should solve it?
Offline
#2 2007-05-10 07:56:09
- alexandra
- Member
- From: Cologne, Germany
- Registered: 2004-04-02
- Posts: 1,370
Re: issue with image pathing
If you use the directory images then this should work
background-image:url(/images/bg_navi.jpg);
Offline
Re: issue with image pathing
I tired that, but in fact it does not work for me. The image is not found or displayed. Any ideas?
robin
Offline
Re: issue with image pathing
robin746 wrote:
I tired that, but in fact it does not work for me. The image is not found or displayed. Any ideas?
just to check, are you sure the image name is correct? when you upload via textpatterns image upload area, it gets renamed to a number.jpg like 26.jpg in auto-incrementing sequential order.
Offline
#5 2007-09-22 15:17:59
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: issue with image pathing
- What is the code you are using to display the images (html, txp tag, …)
- What does it say in Advanced preferences for ‘image directory’?
Offline
Re: issue with image pathing
To answer your questions:
1. images
2. background image styles in my CSS, eg:
p.iconm {background: url(/images/arrowm.gif) no-repeat bottom right;}
To solve my problem:
p.iconm {background: url(/folder/images/arrowm.gif) no-repeat bottom right;}
Where “folder” is the sub-directory I installed in.
:-)
It is annoying that I cannot use relative paths. I don’t really want to have to change the stylesheet every time I move folder. (Need to do that for testing purposes.)
robin
Offline
Re: issue with image pathing
It wouldn’t be that hard to make Textpattern do a quick string search when it serves up the CSS after url(
with trailing “, ‘ or without.
Ofcourse you need to make it a choice aswell.
Plugins:
ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1
“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu
Offline
Re: issue with image pathing
robin746 wrote:
It is annoying that I cannot use relative paths. I don’t really want to have to change the stylesheet every time I move folder. (Need to do that for testing purposes.)
haven’t tried it but this plugin allows you to use non-article related textpattern tags in your css. so that means you might be able to do something like
p.iconm {background: url("<txp:site_url />images/arrowm.gif") no-repeat bottom right;}
so whenever you switch directories, it should automatically pick up the url that you set in the admin -> preferences area.
haven’t tested this though.
Offline
Pages: 1