Should Menu() and getMenu() be renamed?

20 праглядаў
Перайсці да першага непрачытанага паведамлення

Richard Rudy

не прачытана,
11 сне 2016 г., 21:02:4111.12.16
да SilverStripe Core Development
This issue came up on the repo #1696. It may worth while looking into changing the name of the function to something less generic. While using the Menu function is easy to type, it may be too generic. Beyond changing the names of the actual functions, depending on the name it may necessitate updating all related fields. While SIteMenu may add enough specificity to not cause URL collisions, using Navigation or SiteNavigation may bring it inline with HTML coding standards. Menu <menu> is reserved for application state specific contols, while Naviagtion is <nav> is for moving between pages on a site. Lately I've been endevouring to fight the common instinct to refer to navigation as menues when writing front end code to maintain that parity accross HTML, CSS, and JS.

The URL collision is really probably a minor issue, the greater opportunity is to bring the back-end code up to semantic parity with front-end code. This change would probably have to happen during a full-version release as it is API breaking.
Адказаць усім
Адказаць аўтару
Наперад
0 новых паведамленняў