MUST READ: More details about duplicate IDs

Frequently Asked Questions about WYSIWYG Web Builder
User avatar
Posts: 23928
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe

MUST READ: More details about duplicate IDs

Post by Pablo » Thu Jun 14, 2012 6:26 am

The ID attribute specifies a unique id for an HTML element (the value must be unique within the context of the page).
The ID attribute is used to point to a style in a style sheet, and by JavaScript to manipulate the element with the specific ID.

If the ID is not unique then you will have multiple style definitions for the same ID. In that case the browser will the style that appear last in the style sheet.
Also if multiple object use the same ID then JavaScripts (like menus, events, carousels, jquery obejct etc) will not function properly.
So it's VERY IMPORTANT that all IDs are unique within the context of the page.

Normally WYSIWYG Web Builder will give objects unique names automatically. However if you use one of more master pages or master frames then IDs may be duplicated, since the software can not distinguish a master from a normal page and will simply embed the objects exactly as they are.

To check for possible conflicts, please use Menu->Page->Error Reports.

You can change the ID of an object in the Property Inspector:

Or in the Object Manager:

We recommend to give objects on a master page names with a prefix like MasterPage_Text1. This will make sure that if the master page is used in another page, the ID of the objects are unique.

You can also enable the option 'Include page name in automatically generated IDs' in Menu->Tools->HTML.