Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
how do link structures work in sub-sections?
i’m using a script for my contact form to make it look prettier. but in the CSS file the person has coded it as url(image.gif), as well as the javascript file. so when the page executes, it ends up looking for site.com/contact/image.gif
you can make a folder called /contact in your ftp, but that will ruin the contact page altogether.
Offline
Re: how do link structures work in sub-sections?
Stick the images in a directory such as /ui/
on your server (the name should not conflict with a section), then change the css url statements to match this, e.g. url(/ui/image.gif);
(with preceding slash denoting an absolute path from the html root).
TXP Builders – finely-crafted code, design and txp
Offline
Re: how do link structures work in sub-sections?
Why not put the images in your images folder?
Then change the css to url(/images/shadowLowerRight.gif)
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
Re: how do link structures work in sub-sections?
i’ve tried that(you guys are fast btw!), and then what it now does is /site.com/contact/images/shadowlowerright.gif
Offline
Re: how do link structures work in sub-sections?
With a preceding slash in your url statement that should work but it looks like the prettyForms.js also sets the images in the javascript too (see variables at the top) so you may need to change it there too :-)
TXP Builders – finely-crafted code, design and txp
Offline
Re: how do link structures work in sub-sections?
yeah i changed it in the js file as well.
i only know where the images ended up because in Google Chrome it shows you the broken image, and right clicked it to find out more.
Offline
Re: how do link structures work in sub-sections?
yeah i changed it in the js file as well.
Did it not work then?
i only know where the images ended up because in Google Chrome it shows you the broken image, and right clicked it to find out more.
just fyi: Firebug’s (firefox plugin) network pane or Safari’s developer tools can also show you what it is not able to load and where it is trying to find them.
TXP Builders – finely-crafted code, design and txp
Offline
Re: how do link structures work in sub-sections?
no still didn’t work. i’m going to use firebug next time, thanks for the tip.
i hope this can be integrated with zem contact reborn if i ever get it working. forms are such a pain to get looking nice !
Offline
Re: how do link structures work in sub-sections?
Can you post a URL or your modified JS? It’s hard to debug in the dark.
Offline
Offline
Re: how do link structures work in sub-sections?
js/
=> /js/
for an absolute path.
Last edited by jm (2009-04-16 19:11:04)
Offline
Re: how do link structures work in sub-sections?
didn’t see an html page in your links so couldn’t really get to the bottom of it. I did notice however that in your js you have /urbanscav/js/...
and in your css you have /js/...
which are different locations.
TXP Builders – finely-crafted code, design and txp
Offline