add data-pageNameId and cssClass only when nameId not empty
Merge pull request #18 from tschlich/nameIdCheck

add data-pageNameId and cssClass only when nameId not empty