Forums / Setup & design / Nice URL's with <map>

Nice URL's with <map>

Author Message

Bjørn Kaarstein

Monday 25 August 2003 4:14:52 am

I'd very much like to generate nice URL's for a site using this for the menu:

<map name="Map">
<area shape="rect" coords="20,145,146,182" href={'/content/view/full/46'|ezurl}>
<area shape="rect" coords="149,145,279,182" href={'/content/view/full/47'|ezurl}>
<area shape="rect" coords="282,145,413,182" href={'/content/view/full/48'|ezurl}>
<area shape="rect" coords="415,145,546,182" href={'/content/view/full/49'|ezurl}>
</map>

<map name="Map2">
<area shape="rect" coords="17,34,147,76" href={'/content/view/full/46'|ezurl}>
<area shape="rect" coords="149,34,279,74" href={'/content/view/full/47'|ezurl}>
<area shape="rect" coords="281,34,414,75" href={'/content/view/full/48'|ezurl}>
<area shape="rect" coords="416,34,547,75" href={'/content/view/full/49'|ezurl}>
</map>

This works fine, but the URL's sort of sucks. (It's the same menu twice, on different locations) I'm really not quite sure how to solve this with a loop and $:item.url_alias.

Also, while I'm nagging you... <table height ="100%"> doesn't really seem to work from the apache linux server. It works on IIS...
I believe there's a workaround for this problem, but I haven't found the solution yet..

Any suggestions would be very welcome.

Regards Bjørn

Jan Borsodi

Tuesday 26 August 2003 6:41:01 am

The big question is how you get the list, is it a predetermined list or children of a specific node?

As for the table height problem, this shouldn't be controlled by the web server but by the browser. If IIS makes it work it either means IIS does some (black) magic or that IE detects that it's from IIS and enables the table height feature. Who knows?

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Alex Jones

Tuesday 26 August 2003 7:15:34 am

Bjørn, the table height issue has nothing to do with the Web server - it is purely a client-side issue as the server doesn't care what your HTML looks like. The W3C didn't assign a height attribute to table tags, and has since deprecated the attribute 'height' for cells as well as they expect us to use CSS for such styling issues. Some browsers do support the height attribute, but not all of them. If need be, you might try assigning the height to the TD tags, but there are better ways.

If you post what you are trying to do with the table height some of us might be able to help you solve it with valid CSS.

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Bjørn Kaarstein

Tuesday 26 August 2003 3:17:52 pm

Hi, and thanks for replying.

Jan: The 4 links I wan't to generate nice URL's for are all children of node 2. It seems like I'm missing something very obvious here, but still...

Seems like there's some magic going on, because the very same HTML copied into pagelayout.tpl (from index.html running on IIS) is not acting the same way - And yes, it's tested in the very same browser(IE6.0). Really weird.

Alex: What I wan't to achieve with height=100% is the following.
The site is in a table, and when the main content isn't big enough to fill the screen height, the menu (situated both at top and bottom) looks a bit crappy...

Regards Bjørn