Custom template files from my cms

Hi guys,
I have my cms where I have certain categories where each article belongs to it.
Now I’m wondering how to create some type of pages like (blog page, news page, portfolio page) with filename.php entered by user initially created with some css layout based on which type of page is selected.


found something on