Add Page position and parent_page_id
This commit is contained in:
1 parent
96f186a71b
commit
a4c900af4d
6 files changed
+70
-33
No files matched your search
@@ -5,7 +5,7 @@ class Admin::PagesController < ApplicationController
|
||||
# GET /pages
|
||||
# GET /pages.xml
|
||||
def index
|
||||
@pages = Page.all
|
||||
@pages = Page.all( :conditions => { :parent_page_id => "root" } )
|
||||
|
||||
respond_to do |format|
|
||||
format.html # index.html.erb
|
||||
@@ -25,7 +25,9 @@ class Admin::PagesController < ApplicationController
|
||||
# GET /pages/new.xml
|
||||
def new
|
||||
@page = Page.new
|
||||
|
||||
@page.is_published = true
|
||||
@page.parent_page_id = params[:parent_page_id]
|
||||
|
||||
respond_to do |format|
|
||||
format.html # new.html.erb
|
||||
format.xml { render :xml => @pages }
|
||||
|
||||
Reference in new issue
Block a user