After played the DXA example a couple of times, I want to create my own DXA site from scratch, but couldn't find too much guide here.
What I want: a new MVC portal, with only one home page, which will display a list of News, with an navigation bar.
So far what I did are:
Created a new publication 120 MyBlog, which inherited from 100 Master
Created a new schema News, with only 2 fields: title & content.
Installed DXA Visual Studio Templates and create a new DXA site project;
Inside the DXA site project, added a new Area with name MyBlog
Under MyBlog, added a new folder Models with a class News, which map to the News schema;
After that I'm a bit lost.
Inside the MVC project:
Should I create my own controller? Inside the DXA example site, I see only one controller for Admin.
If I add controller, should I add inside the Area or outside the Area?
By default it will generate some folders under the Views folder: Entity, Page, Shared. How can we use them?
After I create the project based on the DXA Site Project, I notice it is a class library type instead of a web site type, which made the cshtml file doesn't work and there is no way to run it. Is it normal?
Inside the publication:
- The DXA example site contains a list of Page Types inside the SG _Page Types, what are they used for? Do we need to copy them to other DXA sites?
Other confuse for the DXA Example site physical folder: it contains a lot of cshtml file under folder Areas\Core\Views, do we need to keep them for other DXA sites or we can just remove them and build our own? If we build our own, how can we link them to the Tridion side page?
Any comments are appreciated.
Thanks.