Search code examples
layoutiframetemp

use iframe or template


Hi: In our application,there are so many sub pages and menus,for example:

the main menu for the whole site:

Index/Document/News/SysConfig and etc.

And inside the Sysconfig page,there are also other menus like :

user managment,roles,logs... and etc.

Now we use the iframe to make the layout of the site,we change the related iframe's src attribute according to user's choice. but I wonder if this is a good idea?

I thought use the tempalte,for example the apache tiles in jsp and the masterpage in asp.net.

I wonder which is the best pratice?


Solution

  • Best Practice would be to go the templated route ...

    I haven't really looked into web accessibility for a long time ... but in the past when I used to work on externally facing sites, using frames of any sort was a big no-no. Screen readers would have problems with frames including iframes. I'm not sure if the current generation of screen-readers handle them better.

    There's also the search result/deep linking issues to consider. For example, will your google result link point directly to the page in the iframe? do you have to do a hack to redirect the user to the main page?

    Also going the templated route may not be that difficult as long as you don't have a lot of content to migrate. There are fantastic content management solutions out there like Wordpress, or Drupal and Joomla if you have more complex needs.