Create a Blog Entry only with Code
Permalink100% code its more easy for me to get the layout and CSS
The code is working (i add in the composer and see the change in the live php).
I KNOW HOW TO GET: Title, date, description, thumbnails.
For example the title in my code is
<h1> Page title is: <?php $title = $c->getCollectionName(); echo $title; ?> </h1>
THE PROBLEM:
i dont know how to?
1) Get the topic list tree (for example "gadgets")
2) Get the by code //// Block TAB ---> Content
(the main text part of the blog) -
The problem is i get an error in the composer form:
"Unable to load block into composer. You must edit this content from within the context of the page.".
3)In general how to get:
- Content
- File
- Image
- Image Slider
What the Trick her? (i try to find this in the API)
What about get the topic node?......and tags.
I need to look at the API for this codes?
Those would be added to the page as blocks when you edit the defaults for that page template.
Here is an explanation of editing defaults for a page template:
https://www.concrete5.org/community/forums/customizing_c5/access-com...
I do not recommend hard coding the Composer block output into your page templates. I am working under the assumption that hard coded block output is not cached. Without caching, this will make your pages much slower.
If you need more control over the layout, I would make a page template for the specific page type. This would allow you more control over the layout and CSS.
To do this:
- create a page type and a page template with the same handle
- set the page type to only use that template