Marv,

 

> The Problem:  when using FU's, the main link (for example,  /go/support/)

> works and it goes to the support page, but the other links in the page (css
> and image links) do not as they are also getting re-written by the rule .
> The css is broken and the image (in this case the mollio logo) does not
> appear.

 

Any relative HTML reference (<img src="" <link href="" <a href="" (when not using friendly urls), <script src="" etc… should always begin with #application.url.webroot#.  This way, whether you’re moving your code from dev to production, turning on and off Friendly URLs, or using your site under an alias/virtual directory… your code will always work.

 

I also use this prefix when outputting _javascript_ or css inside of an include file (I know, its not best practice).  Meaning, any URL referenced within the <script/> block or <style/> blockI would be prefixed with the webroot variable.

 

The variable application.url.webroot can be configured in your config project folder (<project>/config/_serverSpeficiVars.cfm).  If your site runs from the root, leave it blank.  If your site runs from a subfolder, alias, or virtual directory set that info in the variable value.   After changing any values in this file you’ll need to update your application scope for the setting(s) to take effect (?updateapp=1).

 

Here are some examples:

 

<link href="" rel=”stylesheet” />

<script type="text/_javascript_" src="">

<img src="" />

<a href="" text</a>

 

Note:  I used to use the conjurer variable for anchor tag links where I didn’t want friendly urls kicking in, but now that we use go.cfm (for Friendly URLs) it will display go.cfm as the conjurer (instead of index.cfm) and possibly cause problems (at least it did for me during the FC3.0 beta last year), so I don’t bother with that anymore.  (Note to self:  I should probably log that as a bug if it is still one :) ).

 

Also, when using css files, might I suggest uploading your css files into FarCry (making them FarCry objects) and then outputting them in your <head/> block using the importCSS custom tag?

 

---

Jeff Coughlin

Web Application Developer

http://www.jeffcoughlin.com


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "farcry-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/farcry-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to