Hi
Niklas,
I
would not be doing (1) or (2) but a combination of (1) and (3).
(1) is
OK - but you be hard coding your image urls.
(2)
would be evil. This would be modifying FarCry Core and this is not going
to help you when the next upgrade comes out.
(1)
and (3) - you would create a custom type that you use to translate the navID's
into image URL's (but see below for my late brainstorm on
this).
There
is really no simple way to safely extend dmNavigation because it is
core to everything else - and you don't want to modify the core version of
dmNavigation (or of any FarCry core type) because then you will be faced with
all sorts of troubles when you next upgrade (for bugs or whatever
reason).
Now,
if there is enough support for it, you could lobby Daemon to add in an "Image
URL" property to the dmNavigation type (along with the necessary changes in the
code to keep it up to date) and you could then have your image in
there.
As an
alternative, lobby them to agree to the idea - and then do the work to make it
all happen yourself and pass the files back to Daemon to incorporate into the
next build. You will find they are very open to this sort of stuff as long
as the integrity of the core is maintained and people don't have huge migration
paths. This is the beauty of Open Source.
I am
not sure why you would want do this though.
I am
guessing you want a graphical menu - or at least an "icon" with each menu
item.
But -
be cautious - best web design practices say that menus should not
be images. It causes hell when users turn images off or there are
net-gremlins that stop images loading. They should be text first - then
you can dress them up with images if you want.
OH - I
just thought of another way.....
Give
each of your navigation items a unique navAlias. Then create a special
directory for nav images. Name each unique image to be in sync with the
navAlias and use the navAlias on the menu item to get the image. So if
your home page has a navAlias of "home" then you might have a directory with a
file like this......
%yourapproot%/images/navimg/home.gif
so you
could then use:
<img
src="">
<img
src="">
<img
src="">
[NOTE:
I did check on the correct fieldname for navAlias but you can also do a CFDUMP
on the nav query to confirm it]
See -
heaps of ideas.
Regards,
Gary
Menzel
You are currently subscribed to farcry-dev as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004
