Skip to content
This repository has been archived by the owner. It is now read-only.

Rename _GlobalImport.cshtml to _ViewImports.cshtml #2489

Closed
brockallen opened this issue May 3, 2015 · 8 comments
Closed

Rename _GlobalImport.cshtml to _ViewImports.cshtml #2489

brockallen opened this issue May 3, 2015 · 8 comments

Comments

@brockallen
Copy link

@brockallen brockallen commented May 3, 2015

Because it's not really global -- it's relative in the same way _ViewStart is.

@nil4
Copy link

@nil4 nil4 commented May 3, 2015

👍 _ViewImports.cshtml perhaps?

@brockallen
Copy link
Author

@brockallen brockallen commented May 3, 2015

Yep, I'd +1 that suggestion

@danroth27 danroth27 added this to the 6.0.0-beta5 milestone May 5, 2015
@danroth27
Copy link
Member

@danroth27 danroth27 commented May 5, 2015

@dougbu Please post to the Announcements repo when done.

@dougbu
Copy link
Member

@dougbu dougbu commented May 5, 2015

@danroth27 are we going with _ViewImports.cshtml?

@danroth27
Copy link
Member

@danroth27 danroth27 commented May 5, 2015

@DamianEdwards

Sounds reasonable to me.

@glen-84
Copy link

@glen-84 glen-84 commented May 6, 2015

Does "import" refer to importing it into each view file? I initially thought that the @using directives were being referred to as imports, but of course that's not the only directive that you can use within this file. _ViewDirectives would be another option, but I'm not strongly against the suggested name.

Does GlobalImport do something that ViewStart doesn't? I forgot why there are two files, since they both contain "CS HTML" (Razor code).

By the way, would it be difficult to allow these files to be renamed by the developer? (I've never been a fan of the underscore prefixes)

@dougbu dougbu changed the title Should _GlobalImport.cshtml be renamed Rename _GlobalImport.cshtml to _ViewImports.cshtml May 21, 2015
@dougbu
Copy link
Member

@dougbu dougbu commented May 21, 2015

Updated title since this is no longer a question

dougbu added a commit to aspnet/MusicStore that referenced this issue May 21, 2015
- rename _GlobalImport.cshtml file to _ViewImports.cshtml
@dougbu
Copy link
Member

@dougbu dougbu commented May 21, 2015

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants