Open Closed

How can I set a landing page for admin in Abp io #2901


User avatar
0
safi created

Hi

I want to set my custom page as a landing page for admin. Like after login it should show my landing page can you please help me.

  • ABP Framework version: v4.4.3
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no

16 Answer(s)
  • User Avatar
    0
    safi created

    Please let me know how can we do this.

  • User Avatar
    0
    safi created

    Please let me know how can we do this.

    Please reply.

  • User Avatar
    0
    safi created

    Is anyone there to help me out.

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi, this seems to be an unrelated issue with ABP. You can try to find the solution by reading Microsoft's official Blazor documentation.

  • User Avatar
    0
    safi created

    Hi, this seems to be an unrelated issue with ABP. You can try to find the solution by reading Microsoft's official Blazor documentation.

    I checked official documentation but was not able to find out to set a custom page as the default page after login. Please help me.

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi, this seems to be an unrelated issue with ABP. You can try to find the solution by reading Microsoft's official Blazor documentation.

    I checked official documentation but was not able to find out to set a custom page as the default page after login. Please help me.

    Maybe you can set the page route as "/" for your landing page.

    @page "/"
    @page "/my-landing-page-route"
    

    But when you do that, you might get a route mismatch (or duplicate route) exception, so might need to remove the @page "/" statement from your Index.razor file.


    I close this question since it's not related with ABP but I hope my above suggestion will work for you.

    Best regards.

  • User Avatar
    0
    safi created

    Hi, this seems to be an unrelated issue with ABP. You can try to find the solution by reading Microsoft's official Blazor documentation.

    I checked official documentation but was not able to find out to set a custom page as the default page after login. Please help me.

    Maybe you can set the page route as "/" for your landing page.

    @page "/" 
    @page "/my-landing-page-route" 
    

    But when you do that, you might get a route mismatch (or duplicate route) exception, so might need to remove the @page "/" statement from your Index.razor file.


    I close this question since it's not related with ABP but I hope my above suggestion will work for you.

    Best regards.

    Getting error after using this.

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    But when you do that, you might get a route mismatch (or duplicate route) exception, so might need to remove the @page "/" statement from your Index.razor file.

    Did you also do this?

  • User Avatar
    0
    safi created

    But when you do that, you might get a route mismatch (or duplicate route) exception, so might need to remove the @page "/" statement from your Index.razor file.

    Did you also do this?

    yes I remove @page "/" and use this line to call my page @page "/daily-round-tables" but after that getting error in the console.

  • User Avatar
    0
    safi created

    But when you do that, you might get a route mismatch (or duplicate route) exception, so might need to remove the @page "/" statement from your Index.razor file.

    Did you also do this?

    yes I remove @page "/" and use this line to call my page @page "/daily-round-tables" but after that getting error in the console.

  • User Avatar
    0
    safi created

    Hi

    I tried this solution @page "/" and use this line to call my page @page "/daily-round-tables" but after that getting error in the console. It's not working can you please help me in this.

    Thanks,

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi, I've just tried it and it works as expected. I've created a new page and simply define its page route top of this page as below.

    • Index.razor
    @page "/my-second-page"
    @inherits MyProjectComponentBase
    
    This is not landing page.
    
    • MyLandingPage.razor
    @page "/"
    @inherits MyProjectComponentBase
    
    My landing page
    
  • User Avatar
    0
    safi created

    my-second-page

    Hi

    In my application two roles are present and I want to show this page to admin role only so how can I manage this.

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    my-second-page

    Hi

    In my application two roles are present and I want to show this page to admin role only so how can I manage this.

    This is a custom logic and not related to ABP. You can write a middleware or use some other approaches.

  • User Avatar
    0
    safi created

    my-second-page

    Hi

    In my application two roles are present and I want to show this page to admin role only so how can I manage this.

    This is a custom logic and not related to ABP. You can write a middleware or use some other approaches.

    okay can u please let me know how can I hide or delete this line

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Please create a new question, this is not related to the current question.

    Best Regards.

Made with ❤️ on ABP v9.1.0-preview. Updated on December 12, 2024, 07:15