Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_Layout file for Identity not scaffolded #884

Closed
blowdart opened this issue Sep 24, 2018 · 9 comments
Closed

_Layout file for Identity not scaffolded #884

blowdart opened this issue Sep 24, 2018 · 9 comments
Assignees

Comments

@blowdart
Copy link

From @josejmoran on September 16, 2018 23:7

When I scaffold the UI for Identity everything works fine. But the file: Areas/Identity/Pages/Account/Manage/_Layout.cshtml include a line referencing a file that I look for it in the directory it says it should be but is not generated when I scaffold.

@{
Layout = "/Areas/Identity/Pages/_Layout.cshtml";
}

If I comment the line I get an error, which means Identity is using this file. It seems it did not get generated when I scaffold the Identity files. Where is this file located?

Copied from original issue: aspnet/Identity#1967

@blowdart
Copy link
Author

From @IlyaSolovyov on September 17, 2018 9:20

Same issue as #1954. Still waiting for comments from the dev team.

@blowdart
Copy link
Author

From @jamiewest on September 21, 2018 13:42

I can confirm this on the preview 2 bits.

@chrisckc
Copy link

chrisckc commented Dec 7, 2018

Just noticed this using the 2.2 release version

@chrisckc
Copy link

chrisckc commented Dec 19, 2018

@blowdart It seems the best solution is to change the reference in "Areas/Identity/Pages/Account/Manage/_Layout.cshtml" to:

@{ 
    Layout = "/Views/Shared/_Layout.cshtml";
}

This way you only need to maintain a single layout and you also retain the links in the main app navbar when viewing the account management pages, this is what i ended up doing here: #931 (comment)

This should be the default setup provided by the scaffolder or be clearly documented somewhere. If the missing _Layout file existed it would be much easier to see that the main layout file can be substituted by simply comparing the files and observing that they are the more or less the same. Instead i had to poke around and resort to the browser dev tools to see what was going on.

@vijayrkn vijayrkn assigned HaoK and unassigned seancpeters Nov 7, 2019
@vijayrkn
Copy link
Contributor

vijayrkn commented Nov 7, 2019

@HaoK - do you know if this is already fixes?

@HaoK
Copy link
Member

HaoK commented Nov 8, 2019

@javiercn can you remind me again why the layouts/scaffolder are the way they are?

@javiercn
Copy link
Member

javiercn commented Nov 8, 2019

@HaoK can you be more specific? The manage pages have a nested layout if that’s what you are referring to.

@josejmoran
Copy link

josejmoran commented Nov 8, 2019 via email

@josejmoran
Copy link

josejmoran commented Nov 8, 2019 via email

@HaoK HaoK closed this as completed Nov 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants