Sidebar not showing items #939
Answered
by
s8jt8zw8jf-lang
CosminCAS123
asked this question in
Q&A
|
Hey! New to blazor bootstrap and blazor in general(Web App interactive auto template ). In client project, I defined a layout that'll use the SideBar component . I simplified it for this issue ( no data provider) : then the Home page (client project) looks like this : I also tried the layout on my starting auth interactive SSR pages (login and register) from the server, and the same thing happens. I installed blazor bootstrap accordingly to the web app interactive auto tutorial. If you need any more information ,please tell me. Thanks! |
Answered by
s8jt8zw8jf-lang
Aug 13, 2026
Replies: 1 comment 9 replies
|
@CosminCAS123 Thank you for trying BlazorBootstrap. Here is the example: <Sidebar Href="/"
IconName="IconName.BootstrapFill"
Title="Blazor Bootstrap"
DataProvider="SidebarDataProvider" />
@code {
IEnumerable<NavItem>? navItems;
private async Task<SidebarDataProviderResult> SidebarDataProvider(SidebarDataProviderRequest request)
{
if (navItems is null)
navItems = GetNavItems();
return await Task.FromResult(request.ApplyTo(navItems));
}
private IEnumerable<NavItem> GetNavItems()
{
navItems = new List<NavItem>
{
new NavItem { Href = "/getting-started", IconName = IconName.HouseDoorFill, Text = "Getting Started"},
new NavItem { Href = "/alerts", IconName = IconName.CheckCircleFill, Text = "Alerts"},
new NavItem { Href = "/autocomplete", IconName = IconName.InputCursorText, Text = "Auto Complete"},
new NavItem { Href = "/breadcrumb", IconName = IconName.SegmentedNav, Text = "Breadcrumb"},
new NavItem { Href = "/sidebar", IconName = IconName.LayoutSidebarInset, Text = "Sidebar"},
};
return navItems;
}
} |
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment



My bad.
Set the render to be per page instead of global.
Tried to edit the project to global location, but that failed to resolve the issue.
Started a fresh new project using global location, and good to go now.
Seems for layout page you cannot define a render location, so has got to be global if you need to do any rendering in these files.
now to migrate work done to new project..