Forums / Setup & design / How can I get the real address?

How can I get the real address?

Author Message

Fiona Hisa

Thursday 14 December 2006 10:11:35 pm

the original add address :
<link href={"stylesheets/example.css"|ezdesign)} rel="stylesheet" type="text/css">
but I want to change the address to a real address
for example:
http://hostname/design_dir/example.css
I try the following:
{concat('http://',ezsys('hostname'),'stylesheets/example.css'|ezdesign))}
but the result is :
http://hostname"/design_dir/stylesheets/example.css"
how can I drop the 'double quotation marks',("")
or do you have other better method?can you tell me?
thank you very much!
^_^

Jon Staines

Monday 18 December 2006 4:44:55 am

If the stylesheet is always going to be the same, why not just hard code it?
<link href="http://hostname/design_dir/example.css" rel="stylesheet" type="text/css">

If you are needing to change parts of the address, which parts?

Marko Žmak

Monday 18 December 2006 7:54:59 am

Use this code:

{concat('http://',ezsys('hostname'),'stylesheets/example.css'|ezdesign(no)))}

Note the "no" parameter for ezdesign. The documentation for ezdesign() can be found here:

http://ez.no/doc/ez_publish/technical_manual/3_8/reference/template_operators/urls/ezdesign

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Fiona Hisa

Monday 18 December 2006 5:08:57 pm

Thanks a lot,because I want to produce the static HTML page,so the address must be absolute.otherwise the client can't see the images or the CSS.

^_^~~

Marko Žmak

Tuesday 19 December 2006 2:24:26 pm

You're welcome. You can use this "no" parameter with all the other url operators like ezimage, ezurl... I supose ezurl will come in handy too.

P.S. Nice signature :)

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth