Re: Feedback about migration of web
Vincent Brabant <[email protected]> Thu, 10 Mar 2005 22:14:37 +0100
| Newsgroups | gmane.comp.java.netbeans.webteam |
|---|---|
| Message-ID | <[email protected]> |
Jack Catchpoole a écrit :
> Hello Vincent,
>
> Vincent Brabant wrote:
>
>> If I remember well, The layout for www website is not the same as the
>> layout of the other modules website. I would like to propose
>> something to add in the modules website layout, to also have the list
>> of other language.
>
>
> This is the proposal you made some time ago, right ? I have it
> still waiting for me in my Inbox.
>
Hereafter the modification I would like to see in the layout of the website module.
Today you have something that parse the testwww module, and detect if $pageName$_xx.html appears and then add the following in the corresponding page of the www module.
<!-- Tab Navigation -->
<div id="menu"><a href="/downloads/index.html" title="Downloads">
<img src="/images/v4/downloads.gif" alt="Downloads" width="81" height="59" border="0" class="iMenu"><span>Downloads</span></a>
<a href="/products/index.html" title="Products">
<img src="/images/v4/products.gif" alt="Products" width="68" height="59" border="0" class="iMenu"><span>Products</span></a>
<a href="/catalogue/index.html" title="Plugins">
<img src="/images/v4/catalogue.gif" alt="Plugins" width="62" height="59" border="0" class="iMenu"><span>Plugins</span></a>
<a href="/kb/index.html" title="Docs & Support">
<img src="/images/v4/kb.gif" alt="Docs & Support" width="108" height="59" border="0" class="iMenu"><span>Docs & Support</span></a>
<a href="/community/index.html" title="Community">
<img src="/images/v4/community.gif" alt="Community" width="84" height="59" border="0" class="iMenu"><span>Community</span></a>
<a href="/about/index.html" title="About">
<img src="/images/v4/about.gif" alt="About" width="55" height="59" border="0" class="iMenu"><span>About</span></a>
<a href="/win-with-netbeans.html" title="Win an iPod">
<img src="/images/v4/headphones.gif" alt="Win an iPod" width="147" height="75" border="0" class="iMenu"><span>Win an iPod</span></a></div>
*<div id="choose">
<a href="#" onmouseover="sh();">
<img src="/images/v4/choose.gif"
alt="" width="115" height="20" border="0"></a>
<div id="langmenuunder" onmouseover="hide();"></div>
<div id="langmenu">
<img src="/images/v4/lng_choose.gif" alt=""
width="123" height="25" border="0">
<a href="index_cs.html">Czech</a>
<a href="index_de.html">German</a>
<a href="index_el.html">Greek</a>
<a href="index_es.html">Spanish</a>
<a href="index_fi.html">Finnish</a>
<a href="index_fr.html">French</a>
<a href="index_id.html">Indonesian</a>
<a href="index_it.html">Italian</a>
<a href="index_ja.html">Japanese</a>
<a href="index_ka.html">Georgian</a>
<a href="index_ko.html">Korean</a>
<a href="index_nl.html">Dutch</a>
<a href="index_pl.html">Polish</a>
<a href="index_pt.html">Portuguese</a>
<a href="index_ru.html">Russian</a>
<a href="index_tr.html">Turkish</a>
<a href="index_vi.html">Vietnamese</a>
<a href="index_zh.html">Chinese - simplified</a>
<a href="index_zh_TW.html">Chinese - traditional</a>
</div>
</div>*
<br clear="all">
</td>
</tr>
<tr>
<td valign="top" rowspan="2">
<div id="content">
<!-- Begin Content Area -->
But other modules are not pre-parsed. They are directly published.
So, I propose the following:
In the page <head> section of the html page http://fr.netbean.org/edi/31/articles/nb-cvs-31.html, I add the following meta tag:
<META NAME="Translation"
CONTENT="http://www.netbeans.org/kb/articles/nb-cvs-31.html"
TITLE="English">
Then, you need to modify the existing layout with the following:
<!-- Tab Navigation -->
<div id="menu"><a href="/downloads/index.html" title="Downloads">
<img src="/images/v4/downloads.gif" alt="Downloads" width="81" height="59" border="0" class="iMenu"><span>Downloads</span></a>
<a href="/products/index.html" title="Products">
<img src="/images/v4/products.gif" alt="Products" width="68" height="59" border="0" class="iMenu"><span>Products</span></a>
<a href="/catalogue/index.html" title="Plugins">
<img src="/images/v4/catalogue.gif" alt="Plugins" width="62" height="59" border="0" class="iMenu"><span>Plugins</span></a>
<a href="/kb/index.html" title="Docs & Support">
<img src="/images/v4/kb.gif" alt="Docs & Support" width="108" height="59" border="0" class="iMenu"><span>Docs & Support</span></a>
<a href="/community/index.html" title="Community">
<img src="/images/v4/community.gif" alt="Community" width="84" height="59" border="0" class="iMenu"><span>Community</span></a>
<a href="/about/index.html" title="About">
<img src="/images/v4/about.gif" alt="About" width="55" height="59" border="0" class="iMenu"><span>About</span></a>
<a href="/win-with-netbeans.html" title="Win an iPod">
<img src="/images/v4/headphones.gif" alt="Win an iPod" width="147" height="75" border="0" class="iMenu"><span>Win an iPod</span></a></div>
*<script type="text/javascript" src="http://www.netbeans.org/branding/scripts/langs.js"></script>
*
<br clear="all">
</td>
</tr>
<tr>
<td valign="top" rowspan="2">
<div id="content">
<!-- Begin Content Area -->
And hereafter, you have the content of the langs.js file
*if (document.getElementsByName) {
var metaArray = document.getElementsByName('Translation');
if (metaArray.length>0) {
document.write('<div id="choose"><a href="#" onmouseover="sh();"><img src="/images/v4/choose.gif" alt="" width="115" height="20" border="0"></a><div id="langmenuunder" onmouseover="hide();"></div><div id="langmenu"><img src="/images/v4/lng_choose.gif" alt="" width="123" height="25" border="0">');
for (var i=0; i<metaArray.length; i++) {
document.write('<a href='+metaArray[i].content + '>'+metaArray[i].title+'</a>');
}
document.write('</div></div>');
}
}
*
And voilà .
By doing that, we can build dynamically the language menu.
By the way, you can also modify the layout for the www modules to be aligned with this one.
But you add to modify your script to, in place of generating
*<div id="choose">
<a href="#" onmouseover="sh();">
<img src="/images/v4/choose.gif"
alt="" width="115" height="20" border="0"></a>
<div id="langmenuunder" onmouseover="hide();"></div>
<div id="langmenu">
<img src="/images/v4/lng_choose.gif" alt=""
width="123" height="25" border="0">
<a href="index_cs.html">Czech</a>
<a href="index_de.html">German</a>
<a href="index_el.html">Greek</a>
<a href="index_es.html">Spanish</a>
<a href="index_fi.html">Finnish</a>
<a href="index_fr.html">French</a>
<a href="index_id.html">Indonesian</a>
<a href="index_it.html">Italian</a>
<a href="index_ja.html">Japanese</a>
<a href="index_ka.html">Georgian</a>
<a href="index_ko.html">Korean</a>
<a href="index_nl.html">Dutch</a>
<a href="index_pl.html">Polish</a>
<a href="index_pt.html">Portuguese</a>
<a href="index_ru.html">Russian</a>
<a href="index_tr.html">Turkish</a>
<a href="index_vi.html">Vietnamese</a>
<a href="index_zh.html">Chinese - simplified</a>
<a href="index_zh_TW.html">Chinese - traditional</a>
</div>
</div>*
your will generate <meta> tags having as name Translation.
Then we will have the same layout for both www and others modules.
I hope it's clear enough.
If it's not clear enough, please send me the layout file that you use for the modules, and I will do the modification for you.
Vincent Brabant
----------------
http://fr.netbeans.org/