Adding new (and editable) pages under public profile (single pages)

Permalink
I'm struggling with how to add more pages under the public profiles. I pretty much want for the sidebar:

- Profile
- Messages
- Edit Profile
- Resources *
- Terms of Use *
- FAQ *

* Pages I need to create and be editable by admin with blocks. DO NOT have to be editable by registered users.

Do I need to create single pages? How do I do this... I tried copying the existing pages and working off those but nothing is working. I essentially want to make a page like the profile page where you have the sidebar and a main editable block. Not a PHP expert so any help would be appreciated.

 
planist1 replied on at Permalink Reply
planist1
This page might give you the instructions needed. http://www.concrete5.org/documentation/developers/permissions/profi...
hsuarez replied on at Permalink Reply
I've tried that already but it doesn't give much info on adding new pages. I've managed to create the FAQ page but I get errors like:

"Fatal error: Call to a member function getUserID() on a non-object in /Applications/MAMP/htdocs/c5/elements/profile/sidebar.php on line 9"
JohntheFish replied on at Permalink Reply
JohntheFish
Just navigate to the profile page and add a page as you usually would using the edit/Add a sub page button.

(I tried it out earlier today when testing some Magic Data functionality)
hsuarez replied on at Permalink Reply
How would you make the side navigation show tho? Is there a page type the single pages use? I'm just working with a very basic install with the Right Sidebar page type so When i add the page it looks nothing like the rest of the profile pages.
JohntheFish replied on at Permalink Reply
JohntheFish
From a theme, single pages use view.php. Most themes define view.php as being similar to default.php (the default page type), though that is not always the case.

You can map single pages to use your theme rather than the core default in config/site_theme_paths.
hsuarez replied on at Permalink Reply
I do have a view.php and I added a page under Profile but I can't get it to look like the rest. What page type do I choose or do I make it a single page? I'm confused.
JohntheFish replied on at Permalink Reply
JohntheFish
In the new page dialog, where you get a row of page type icons and a row of theme icons, choose 'default'.

Its a regular page you need to add. Not a single page. Single pages have to be written in php. If you try and add a regular page as a single page it will be sure to break.
hsuarez replied on at Permalink Reply
I'm using the greek yogurt theme for testing before I make my own.I did selecte the default theme and I do have a view.php but still no luck, just a blank page with editable block, no nav showing profile links or anything.
hsuarez replied on at Permalink Reply
and, when I add it as a single page, I get this:

Fatal error: Call to a member function getUserID() on a non-object in /Applications/MAMP/htdocs/c5/elements/profile/sidebar.php on line 9
JohntheFish replied on at Permalink Reply
JohntheFish
Something to bear in mind is that there is only one profile page (ie a single page), that adapts what it shows according to the user id passed to it.

So any regular pages beneath the profile page will be the same page for all users, not a separately editable page for each user.
hsuarez replied on at Permalink Reply
Any more info on this? Am I wording it wrong, I've been treading water on this issue for a while and if I can get it straitened out it will help me out greatly.

I simply want to add more pages in the member sidebar (accomplished) and have those pages take the same properties as the single pages (display the member sidebar nav). I'm using the Greek Yogurt theme.