Changed Itemid implementation

Changed Itemid implementation to make it work with sef urls