Hello, I didn't understand the way that you want to transform your code but i think this url has a lot of sample configuration that you maybe need to take a look and i wish that help you out.