Make Custom view.php for Different Type of Posts
Permalink
Hi guys,
I just moved from some other CMS to C5. It's a great to work with, and I am really thankful to people working behind, however I am stuck at the moment.
I can't figure out why does the blog content have to appear on view.php page, and why I can't simply make single.php and show the content inside of it using <?php echo $innerContent; ?> Actually, I probably can, but don't know how. Also, how to control what to show up, like title, meta, content etc...?
Second question is why only default Blog Entry page type has that feature rich text editor. I've created another blog page type but have only those standard features like on any other page (attached screenshot).
I really love c5 and definitely decided to use it for my future clients. I studied documentation, read dozens of tutorials, but I need a help with solution.
I just moved from some other CMS to C5. It's a great to work with, and I am really thankful to people working behind, however I am stuck at the moment.
I can't figure out why does the blog content have to appear on view.php page, and why I can't simply make single.php and show the content inside of it using <?php echo $innerContent; ?> Actually, I probably can, but don't know how. Also, how to control what to show up, like title, meta, content etc...?
Second question is why only default Blog Entry page type has that feature rich text editor. I've created another blog page type but have only those standard features like on any other page (attached screenshot).
I really love c5 and definitely decided to use it for my future clients. I studied documentation, read dozens of tutorials, but I need a help with solution.
Hutman, thank you for the response. I really appreciate the effort you are giving.
Actually I figured out how to use Composer for every page other than blog_entry only, and this is a great resoursehttp://www.concrete5.org/documentation/how-tos/editors/setting-up-a... However, thank you.
I will be a little bit more specific now. I want to have a control over what will be displayed on a post. For example, when you create custom page list template, you can set
and by this you can control what will be displayed on certain page list template. But when it comes to post or view.php (it's single.php in wordpress) you just put and it outputs title and content. How can I display author, date or category on each single post?
One more question is how to use Name from Basic information as a title that will be displayed on a particular page (as on blog_entry).
Many thanks.
EDIT: I am building a custom theme.
Actually I figured out how to use Composer for every page other than blog_entry only, and this is a great resoursehttp://www.concrete5.org/documentation/how-tos/editors/setting-up-a... However, thank you.
I will be a little bit more specific now. I want to have a control over what will be displayed on a post. For example, when you create custom page list template, you can set
<h1> Header </h1> <p> Meta </p> <img> <p>Description</p>
and by this you can control what will be displayed on certain page list template. But when it comes to post or view.php (it's single.php in wordpress) you just put
<?php echo $innerConent; ?>
One more question is how to use Name from Basic information as a title that will be displayed on a particular page (as on blog_entry).
Many thanks.
EDIT: I am building a custom theme.
The "Name" field from the Basic Information section of the Composer is automatically the Page Title that is used in the Sitemap, etc.
In order to customize what shows on the page itself you can create a your_page_handle.php in the theme folder where your_page_handle is the same as the Handle field in the Page Type Settings.
For that PHP file copy the default.php from the theme and then add whatever fields you would just like in the Page List Template, except instead of using $page use $c which is the current page variable. This should help you get the fields that you are trying to use http://www.concrete5.org/documentation/developers/pages/overview...
In order to customize what shows on the page itself you can create a your_page_handle.php in the theme folder where your_page_handle is the same as the Handle field in the Page Type Settings.
For that PHP file copy the default.php from the theme and then add whatever fields you would just like in the Page List Template, except instead of using $page use $c which is the current page variable. This should help you get the fields that you are trying to use http://www.concrete5.org/documentation/developers/pages/overview...
Can you please provide a little more information, what Theme are you using and what is the handle of your new Page Type?
The Blog Entry Page Type has the WYSIWYG editor on it because it has that attribute enabled in the Composer settings. You can see this by going to the Dashboard -> Page Types -> Composer, the attributes for your site are listed there and the ones that are checked are offered on the Composer page.
The front end display should either be using the page_type_handle.php or the default.php in the Theme folder. If you have created a new page type and you want that to display differently, or you want it to display alternate fields you can create a your_page_type_handle.php in the Theme and setup whatever you want to display there.
I hope this helps, it's pretty generic because there isn't much information to go off of.