Theme path and file name for custom profile edit page (i.e. not view.php)?

Permalink
Hi all

I'm trying to theme the profile edit page to match the profile page, but I can't work out what to put in site_theme_paths.php. When I do it this way:

$v->setThemeByPath('/profile/edit', "scotlawcom");


I don't know what to call the file in my theme's directory! (profile_edit.php doesn't work).

Can anyone help?

melat0nin
 
moosh replied on at Permalink Reply
moosh
hi,

Normally just need to do :
$v = View::getInstance();
$v->setThemeByPath("/profile/edit", "yourtheme");


++
melat0nin replied on at Permalink Reply
melat0nin
Thanks

What's the filename of the custom page though?
moosh replied on at Permalink Reply
moosh
What do you mean by "custom page"?
melat0nin replied on at Permalink Reply
melat0nin
You can override a page's style by creating a new file in the theme folder (e.g. page_not_found.php for a 404 page). I want to override the profile edit page so that it doesn't use view.php (which includes elements I don't want displayed on that page). Trouble is I don't know what the correct file name for the override is.
moosh replied on at Permalink Reply
moosh
You must copy/paste profile/edit.php in single_pages folder in the root (keep profile folder).

view.php is automatically used.

To bypass this, I think you need to implement conditions in view.php which detect you are visiting or not profile/edit.php page.
moosh replied on at Permalink Reply
moosh
Or you can read part "Customizing a Single Page's Appearance" on this page :-)
http://www.concrete5.org/documentation/developers/pages/single-page...
melat0nin replied on at Permalink Reply
melat0nin
Thanks. I just needed to create an edit.php file in my theme's folder then set the path in site_theme_paths.php. It was the filename edit.php I wasn't sure about - I thought it would require a more complex filename to reflect its path (/profile/edit), but apparently not.
moosh replied on at Permalink Reply
moosh
and if you create folder "profile" in themes then under it "edit.php" ?
jordanlev replied on at Permalink Reply
jordanlev
You're correct -- it should just be called "edit.php". Unfortunately (in my opinion), C5 doesn't handle subdirectories for the view template overrides in your theme like this (so putting the "edit.php" file in a "profile" subfolder doesn't work). Everything should work just fine, unless of course you have some other single_page somewhere that also happens to be called "edit.php" -- then you will run into problems.

Strangely enough, someone else asked about this just now, here's my response (it's somewhat relevant to this discussion):
http://www.concrete5.org/community/forums/customizing_c5/about-view...