Base solution for your next web application
Open Closed

Sample-blog-module loading wrong view #685


User avatar
0
marcosli created

Hi,

I was studying the sample-blog-module application, but i didn't understand the behavior of the views. The content of blog page is loaded from the app and not from the module. Also the *.cshtml and *.js of the blog view is duplicated. Is that correct ? Because in my point of view the app should render the views and scripts from module.

Thanks

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

3 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    Hi,

    blog module is not for AspNet Zero. It's a simple example and designed for open source "ABP + module zero" template (<a class="postlink" href="http://www.aspnetboilerplate.com/Templates">http://www.aspnetboilerplate.com/Templates</a>).

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    marcosli created

    Hi,

    Sorry, i should have asked this in the "Module Zero" forum.

    But I've followed the steps just like in <a class="postlink" href="https://github.com/aspnetboilerplate/sample-blog-module">https://github.com/aspnetboilerplate/sample-blog-module</a>. So I've used just like you said, the "ABP + Module Zero".

    In that repository you created twice the blog view and its js file: sample-blog-module/src/Abp.Samples.Blog.Web/App/Main/views/blog/ sample-blog-module/app/MyAbpZeroProject.Web/App/Main/views/blog/ Why these files are duplicated?

    To determine which view is being rendered, I modified the contents of the view of the src folder, and nothing happened. But when I modified the contents of the app folder view, I could see the updates.

    It would not be right to keep only view the files in the src folder? And the application load its contents from the module?

    Thanks

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    hikalkan created
    Support Team

    app folder contains a sample application that installed blog module. When you install blog module, views and scripts are copied into your application's App/Main/views/blog/ folder. So, there is no duplicate actually.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)