Create a Blog Entry only with Code

I want the composer output to be 100% in the PHP code (dont want to go to "page types" - "deafults" and than add att..blocks and the "composer block")

100% 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
   Page title is:
   <?php   $title = $c->getCollectionName();
      echo $title;

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)

View Replies: View Best Answer
MrKDilkington replied on at Permalink Best Answer Reply
Hi siton,

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
siton replied on at Permalink Reply
Thanks :)

What about get the topic node?......and tags.

I need to look at the API for this codes?
MrKDilkington replied on at Permalink Reply

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: