node to page: Add Pages to Page

As an alias to .Data.Pages for home page etc.

Also renamte NodeType to PageType and make it a string so it can be used in `where`.

Updates #2297
This commit is contained in:
Bjørn Erik Pedersen
2016-11-11 09:19:16 +01:00
parent 063b78d2ec
commit c80308e6b3
13 changed files with 204 additions and 209 deletions

View File

@@ -415,11 +415,11 @@ func doTestSectionPagesMenu(canonifyURLs bool, t *testing.T) {
fishySectionPages := s.Sections["fish-and-chips"]
assert.Equal(t, 1, len(fishySectionPages))
nodeFirst := s.getPage(NodeSection, "first")
nodeFirst := s.getPage(PageSection, "first")
require.NotNil(t, nodeFirst)
nodeSecond := s.getPage(NodeSection, "second-section")
nodeSecond := s.getPage(PageSection, "second-section")
require.NotNil(t, nodeSecond)
nodeFishy := s.getPage(NodeSection, "fish-and-chips")
nodeFishy := s.getPage(PageSection, "fish-and-chips")
require.Equal(t, "fish-and-chips", nodeFishy.sections[0])
firstSectionMenuEntry := findTestMenuEntryByID(s, "spm", "first")
@@ -555,7 +555,7 @@ func TestHomeNodeMenu(t *testing.T) {
s := setupMenuTests(t, menuPageSources)
home := s.getPage(NodeHome)
home := s.getPage(PageHome)
homeMenuEntry := &MenuEntry{Name: home.Title, URL: home.URL()}