On Tue, Mar 23, 2010 at 5:15 AM, Markus Weimar
<[email protected]> wrote:
> Maybe this could also lead to an easier way to link to other fields
> regardless of the server. I'm currently using this little hack:
>
> [if equal {port}
> 80][[http://{domain}/software_en|[^en.png^]]][else][[http://{domain}:{port}/software_en|[^en.png^]]][if]

Why not do it like this in your php file:

if ( local file... ) $BOLTvar['$domain'] = 'http://localhost:8888/';
else $BOLTvar['$domain'] = 'http://my.domain.com/';

Then you can just do:

[[{domain}software_en|...]]

and it should work either place...  ?

Also, don't forget about interwiki. See the default settings on
site.interwiki and add some for your various locations. Then you can
just put

[[myfield:some.page]]

And it will go to wherever you have set myfield to go.  I just added
this interwiki entry to the core for fun:

google: http://www.google.com/search?q=

So in the next release you can do

[[google:my+search+terms|search]]

Well, seems cool enough to me to be worth adding!

Cheers,
Dan

-- 
You received this message because you are subscribed to the Google Groups 
"BoltWire" 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/boltwire?hl=en.

Reply via email to