On 04/30/2014 03:10 PM, Gerritjan Koekkoek wrote:
> As you know some internet people do not use javascript. The most important
> of all are the search-engines.
> Now we have modified the default behavior of panels
> If panel is of type navigation it will load with the following div
> <div class="panel collapsed MoreAboutCdls Navigation">
> ...
> </div>
> Other wise it will load as
> <div class="panel expanded Diaporama Information">
> ...
> </div>
> 
> The result is that navigation panels that contain mostly links to other
> parts of the site show only the titlebar, when user clicks on that it
> expands and reveals the navigation links; we believe this reduces screen
> clutter.
> 
> My question is two:
> 1) When java script is turned of there is no way a user can see the links.
> What would be the effect on search engines, will they see the links? I see
> the html with the links when I use html-source code, it is just hidden by
> the CSS!

Yes, the panels are "collapsed" via CSS, so the content is just hidden, not 
removed.
If you want to hide the links from search engines you would need a different 
approach.


> 2) Disabled people that are deaf or blind often use browsers without
> javascript.
> How could I have achieved the same with some changes. I would prefer the
> panel to load 'expanded' then with javascript that would set all panels of
> type Navigation to collapsed after the page load. But allow the user to
> click on the header and set it to expanded.

not sure if this is the best choice, but you can add a XWiki.JavaScriptExension
object to some wiki document, make sure it's "Usage" is set to "Always on this 
wiki",
and contents are something like:

document.observe("xwiki:dom:loaded", function(){
 $$('.panel').each( function(panel) {
    panel.addClassName('collapsed').removeClassName('expanded');
 })
});

This should collapse all panels on page load, if javascript is enabled.

hope this helps
Clemens

_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to