Robert-Frampton/liferay-portal — pull request #277 by herious1989 (2014-09-11 19:27:47+00:00)
Title: Lps 49953 Create taglib for Alloy video module

Jira: https://issues.liferay.com/browse/LPS-49953

- Alphabetizing attributes in xml and jsp.

- Removing `start.jsp` and `end.jsp` and put everything in `page.jsp`.

*For the `id` that you mentioned, it is used to keep the module I have tested with the following cases:*

- No `id` attribute is defined.
- Using multiple video modules in one portlet or different portlets.

As a result, without a unique id for each module, they would all be stacked up at the top of the page or overlapped.

So I came up with a solution, that is to attach a random digit to the id: `<%= id %>_<%= r %>`. So every time a video module is created, its id would be something like: `id='#video-id_14'`. If there is no id passed into the module, the id would look like: `id='#_21'`.

These unique ids will ensure each of video module stays under the portlet that calls it, and if there are 2 or more modules in one portlet, they would stay separated rather than overlapped on each other.

My concern: is the id attribute still needed from user's input?, since each module would generate an id anyway. I'm thinking if the users still need the id to do something else? Please advice me on this.

Thanks