page layout not working

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 года назад
Hi, the layout of a page from my plugin doesn't seem to correctly work?


this is the file in the view folder from my plugin:


@{
    Layout = "_ColumnsOne";
}

<div class="page blogpost-page">
    <div class="page-title">
        <h1>@ViewBag.Name</h1>
    </div>
    <div class="page-body">
        <div class="post-date">

        </div>
        <div class="post-body">
            @ViewBag.Text
        </div>
        
        <img src="@ViewBag.PictureUrl" alt="">
        @ViewBag.Picture
    </div>
</div>



would appreciate any help.
4 года назад
Looks like you are on the admin area and you are using the layout used in public portal. You have to use either
Layout = "_ConfigurePlugin";

Layout = "_AdminLayout";

as the layout in the admin section.
4 года назад
Hi, This page is not meant as the configure page. but for a page by itself.
4 года назад
Nope53 wrote:
Hi, This page is not meant as the configure page. but for a page by itself.

Sorry, I think I misunderstood your question. I have edited my answer. Please check and see if it is helpful.
4 года назад
Hi, so I am trying to accomplice a page like the product page but with my own pictures and descriptions. and without the buy button in general just a cleaner look. so it will end up being under for example the url-path /project/1.
4 года назад
Your URL suggests you are in the admin area. Have you decorated your controller with the area attribute? Try removing the area attribute and see if the styles get rendered properly.
[Area(AreaNames.Admin)]
4 года назад
sanju.dahal741 wrote:
Your URL suggests you are in the admin area. Have you decorated your controller with the area attribute? Try removing the area attribute and see if the styles get rendered properly.
[Area(AreaNames.Admin)]

Thank you this helped.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.