How to make advanced flexible semantic layouts