Is there a more In-depth concrete5 documentation?

Permalink
Hello World!
I was wondering if there is a more in-depth documentation for developers, than the documentation online, which is also a bit more verbose than the api reference. I am trying to learn basic things, like manipulating with blocks, scrapbook objects, etc... from within a custom page type for example, but I could not find a suitable guide neither online nor printed. To be more definite: I was looking for a way to add some content to a certain page type, which could be modified through the scrapbook. I found the method I was looking for, but I could not find a reference on the arguments it accpets - thus, I could not make much use of my findings. Any suggestions would be nice! Thanks in advance!

 
carlos123 replied on at Permalink Reply
Hi there,

If you are a web developer trying to do things under the hood with Concrete5, I...well...I sympathize with you.

As a fellow web developer, working with C5 under the hood has been an absolutely pain in rear. The code goes all over the place and trying to figure out what it does is, at times, what unraveling spaghetti must be like.

Mind you we can't complain since C5 is free but still, what is is what it is.

If you can't find the documentation that you need after Googling all over...about the only options you have are to either spend countless hours pouring over C5 source code until you understand it yourself or asking here on the forum.

I personally will likely be going back to work with my own CMS system which doesn't use Concrete5's MVC approach. An approach that many tout as the next paradigm shift to programming greatness but which I personally consider to be a step backwards into increasing and unnecessary programming complexity.

Best wishes.

Carlos
szucslaszlo replied on at Permalink Reply
Hey!

Yes, I believe you got my point. I am happy,because it seems I am not the only one with this problem, but I am sad that you could not find proper support either. Yes, it is a great thing, C5 being free and open source, but this way, it is hard to get the maximum out of it. In fact: I could do more with coding HTML by hand and starting from scratch for the simple tasks I am trying to accomplish through C5... oh well, I hope someone will stumble upon us with a neat suggestion nowadays, because this is the system my employer intends to use in the future. Thanks!
12345j replied on at Permalink Reply
12345j
for scrapbook block, use
Block::getByName('Scrapbook Block Name')->display();
szucslaszlo replied on at Permalink Reply
Hey there! First things first: thanks for your answer. Now on to business: that is not what I want to achieve. The problem that is solved by that code has been solved earlier... I am looking for general answers on how to do things, such as creating a custom page type with some specialized blocks added automatically. One example question: how to set the attributes of a page-list from the 'rear'? What are the valid attribute values? How do I know if a methods parameter is an object or a value? How should I know what does a method return, if the return is value is given void, but it is clearly returning an object? I guess I mustn't go and read all the code by myself, but I didn't find anything related to these questions, apart from the API reference, which I can not use very practically, especially that I am using version 5.4.1.1 and some files and directories appear to be named differently... :/ if you have any suggestions, I would greatly appreciate them!
12345j replied on at Permalink Best Answer Reply
12345j
hey,
didn't realize that you had solved it already.
If you have specific questions, just post them on the forum, lots of questions are answered every day.
One thing that I usually do is to check out the database, where things are stored, and as what. It only takes a minute, but it can be really useful for knowing what values are valid/invalid.
To answer some of your example questions-
1) making a page list block
<?php
    $bt = BlockType::getByHandle('page_list');
    $bt->controller->orderBy = 'display_asc';
    $bt->controller->cParentID = 1;
    $bt->controller->paginate = 0;
    $bt->controller->rss = 1;
    $bt->render('view');
//the options are the names of the columns. 
//These columns are specified by db.xml
// go to root/concrete/block/page_list/db.xml to find the column names 
// set them in the format $bt->controller->columnName='value';
?>

2) depends on the attribute, but the name of the attribute should be pretty explanatory. This is where looking in the db is really useful
3) If its not in the api, you have to play with it. One thing you'll find is that the function formats are pretty universal- uID will always be the user id in a function, cID the page id, etc.
4) thats just an issue with the api

nothing should be named differently, btw.
szucslaszlo replied on at Permalink Reply
Ah, I see... now, this db.xml brought me a bit closer for what I was looking for, but again, I have some questions: how do I know, what kind of parameters does getByHandle accept? Is it ALWAYS the directory name of the block? Or is it some identifier, that is tested against a database query? I quickly took a look into the block_types.php file and concluded that the anwer might the later one - but is there no other way to get this information, than to browse through source code and study database tables? It's okay if there isn't, but in that case, I would like to hear this from more experienced one's that this is the path to go, before, I invest days into this. Thank you for your advice.
12345j replied on at Permalink Reply
12345j
its always the block handle. developing for c5 has a fairly steep learning curve, but it maintains the same conventions throughout it, so theres definitely an aha! moment. I've found that some of the best ways to learn aren't by combing through files- though I've definitely done so, but to read the terminology and overviews in the developers guide of how things work.
A good starter is
http://www.concrete5.org/documentation/introduction/terminology...

theres also a book available that helps a lot.
szucslaszlo replied on at Permalink Reply
I did read the developer's guide on the documentation page, but could not find the information I was looking for many times - though it is possible, that I could not understand it well enough... I guess I'll have to take another 'ride' on that one. Anyway, thank your for your time, I learned some new, interesting things.
carlos123 replied on at Permalink Reply
Hmmm...well...ahem...cough, cough :)

Please note that I didn't say anything about a lack of support. Forum members here have been pretty responsive to my questions.

To be sure this forum is puny compared to many and a fair number of my more complicated questions go unanswered but that's to be expected given that people here don't get paid for their answers.

I just said that C5 is not easy to understand at all if you are going to go mucking around inside it's code or wanting to harness it to do what you want it to do that is different from your typical point and click with the mousy and drag it over here type of operation.

Carlos
szucslaszlo replied on at Permalink Reply
I didn't mean to say there is a lack of support, I thought this word would be right in this context, but it appears it wasn't. Sorry. :) I was just trying to say, that there are lots of videos and tutorials and forum threads about different tasks than can be done with editing a few lines, overwriting some files and doing a few clicks, but the tasks I am trying to do, somehow seem to be 'too specialized'... and I don't have the time to await for answers too long, that is why I would have preferred a more comprehensive guide, online or printed, which could be absorbed as fast as needed.

Laszlo