add data-pageNameId and cssClass only when nameId not empty

otherwise we have css class "page-".
Maybe it is not necessary to do the same with data-pageNameId? At least in my case i don't get any empty 'data-pageNameId=""' in the markup...