create a new right side bar pagetype in the dashboard

Permalink
can i create a new right side bar page type with a new name inside the dashboard without ftp?

theguideus
 
Blenderite replied on at Permalink Reply
Blenderite
What do you mean without FTP? Are you not wanting to upload the new page type?

There should be a way for you to do this with the in house File Manager provided by your hosting service. If you have cPanel, then you can create a new file, my_new_page_type.php and then populate the file with the new code.

Other than that, I am sure that other File Managers can copy a file. Then you can rename it and edit it, putting in the new code.
theguideus replied on at Permalink Reply
theguideus
i have a dedicated server and currently don't have access, but need to make a couple pagetypes with out access to the server or any files
theguideus replied on at Permalink Reply
theguideus
does c5 have a file manager that would show the folder that i need to duplicate
Blenderite replied on at Permalink Reply
Blenderite
Have you tried using Add Page Type?
theguideus replied on at Permalink Reply
theguideus
the icons at the top are just images, there is actually no way to choose a page layout. all pages created are the same. unless i'm not seeing something?
Blenderite replied on at Permalink Reply
Blenderite
Check this out. Not sure if it will do what you want.
http://www.concrete5.org/marketplace/addons/attribute-block/...

How are you wanting to modify the page types?
theguideus replied on at Permalink Reply
theguideus
i've been looking at that for other reason's and am interested to see how it actually works.
jordanlev replied on at Permalink Reply
jordanlev
You can create all the page types you want via Dashboard > Pages & Themes > Page Types (click the "Add a Page Type" button at the top-right of the screen). But note that creating a page type is a separate step from designing the layout of a page type. C5 will look for a file in your theme directory having the name that matches the page type handle (for example, if you create a new page type with the handle "right_sidebar", C5 will look for a file called "right_sidebar.php" in your theme directory). If it doesn't find that file, then it falls back to the "default.php" template for the layout.

But I think what you're really asking is if there is a text editor in the dashboard that lets you edit the actual theme files (like Wordpress has)... there is not one built-in. But there is an addon in the marketplace that claims to do this:
http://www.concrete5.org/marketplace/addons/theme-editor/...

However, note the warning at the top of that page: it is no longer being maintained by the author. So it may or may not work.

Good luck!

-Jordan
theguideus replied on at Permalink Reply
theguideus
i must have did something wrong. i gave the new pagetype the same handle. side_bar and got an error . how do i let c5 know that i want it to be a side bar template?
jordanlev replied on at Permalink Reply
jordanlev
Go to the page type in Dashboard > Pages & Themes > Page Types, click the "settings" button next to the sidebar page type, and check its handle. Then look in your theme's folder and make sure there's a file that has the same exact name as the handle, but with ".php" at the end of it.

If that's all working, then you probably have an error in your page type template (the side_bar.php file). What does the error say?
theguideus replied on at Permalink Reply
theguideus
mysql error: [1062: Duplicate entry 'right_sidebar' for key 'ctHandle'] in EXECUTE("insert into PageTypes (ctHandle, ctName, ctIcon, ctIsInternal, pkgID) values ('right_sidebar', 'church', 'template3.png', 0, 0)")
jordanlev replied on at Permalink Reply
jordanlev
That error indicates that you already have another page type with the same handle ("right_sidebar"). Check your other page types, and delete the other one that has that handle (or change its handle to something else).
If that's not the problem, then there might be some leftover bad data in your database. If this is the case, I think you should just pick another handle to use so you can avoid this error (for example, "right_sidebar_2" or "new_right_sidebar" or "right_sidebar_fix"). You can still set the "Name" of the page type to be whatever you want so it shouldn't matter what the handle is. (Just make sure that you name your theme template the same as the handle, so "right_sidebar_2.php" or "new_right_sidebar.php" or "right_sidebar_fix.php" in my above examples).
theguideus replied on at Permalink Reply
theguideus
i changed the handle on the current right_sidebar, but it removed the right sidebar layout. i must be missing something. if i give a handle other than right_side bar i get a basic layout. even if i name it right_sidebar2???
jordanlev replied on at Permalink Reply
jordanlev
Because if you don't have a template file in your theme with the EXACT same name as the handle, then it uses "default.php" instead. So if you changed your page type handle to "right_sidebar2" then you need a theme template file with the name "right_sidebar2.php".
theguideus replied on at Permalink Reply
theguideus
but if i use the exact handle i get the duplicate error?
enlil replied on at Permalink Reply
enlil
what you need to do is first, copy your theme from concrete/themes or packages/themes to root/themes. Then navigate to your root/themes/themefolder/pagetypes, and copy the right_sidebar.php file to a new name, then go to add page type and add a new type using the handle of the new php file in your pagetypes. for instance if the new file is named my_right_sidebar.php then the handle for the page type will be my_right_sidebar.
theguideus replied on at Permalink Reply
theguideus
i currently don't have ftp access?
jordanlev replied on at Permalink Reply
jordanlev
If you don't have FTP access (or access to a "CPanel" or "Control Panel" on your web host) then you cannot create custom templates for your theme. You can create new page types by using new page type handles, but they will all wind up using your theme's "default.php" template.
theguideus replied on at Permalink Reply
theguideus
thanks for all the help! Shawn