Adding pages to Nova?

Having a problem with your site? Post in here, and we'll see what we can do to help!
Post Reply
Petty Officer 3rd Class
Petty Officer 3rd Class
Posts: 78
Joined: Wed Aug 17, 2011 2:54 am

Adding pages to Nova?

Post by KejalBuris » Thu May 03, 2012 3:09 am

Okay, I've been looking through AnodyneDocs, here: Specifically, I want to add 2 pages to the USS Dauntless, one for Rules and one for Ship's History. All I want them to do is display messages, one with the key "rules", the second keyed "history". So, well, how do I add a page without breaking anything?

Can someone show me how to write the code without breaking the site? It would certainly help.

Oh, P.S., rules would be listed as main/rules ; and the history would be listed as sim/history . If that would have any effect, I figure I should tell you.

Taeran Ishcrio
Crewman Recruit
Crewman Recruit
Posts: 1
Joined: Sun Dec 27, 2015 11:40 pm

Re: Adding pages to Nova?

Post by Taeran Ishcrio » Mon Dec 28, 2015 4:31 am

I realize that this is a very old post, however, seeing that it hadn't been answered yet, I figured I would supply an answer for any other Nova Site admins that may not know how to do this either.

If you want to add additional pages to existing sections (i.e. main or sim) then you'll just add the pages in /application/views/_base_override/%section%/pages/ and save it as %section%_mypage.php. After that, you'll need to create a router in the corresponding controller in the /application/controllers folder.

To create the router, open the appropriate controller file and add this:

Code: Select all

public function mypage()
     $data['header'] = "Header Title";

     $this->_regions['content'] = Location::view('%section%_mypage', $this->skin, '%section%, $data);
     $this->_regions['title'].= $data['header'];

Once you've done that, you'll need to create a link to it from your Nova control panel by going to Control Panel => Menu Items => Add Menu Item. From there, you can name your page and reference it by putting %section%/mypage. Continue filling out the rest of the options and then click Submit to create your page link. Then your new page should automatically display when you click on the link to it. Good luck and happy adding. :)

Post Reply

Return to “Website Helpdesk”