Composer in C5 v5.7.3

Permalink
OK, I've never messed with Composer before (!), having built basically "marketing" type sites, but now I need to build a listing site for realty, so I am thinking Composer might be a pretty good idea.

<screech>

But how to set it up in 5.7.3??? I was expecting to find a "Composer" button next to my page under Page Types, but all I see is Basic Details | Edit Form | Output | Attributes | Permissions | Copy | Delete

Under Basic Details, I have an option to "Launch in Composer?" No/Yes. Fixing to play with that, maybe will answer my own question. I have the default (I assume) Content block on the Composer form already (from install) but nothing I enter there comes out on the page, so I am not sure how this works to pull any composer blocks onto the page. All I can find is older 5.6 documentation, or early 5.7 docs/video, and it seems to be changed now. Even on Page Type "Output" defaults, I can't add any particular corresponding block type (Content for example) and click on that block and "register" it to Composer.

I probably just need a push in the right direction, have built several 5.6 sites, this is my second foray into 5.7, first was a veeery simple site, that went well.

Thanks in advance for hints/links. Apologies for verbose post.

tduncandesign
 
MrKDilkington replied on at Permalink Best Answer Reply
MrKDilkington
Hi tduncandesign,

Setting "Launch in Composer" to yes, makes newly created pages open in Composer. Clicking on the toolbar gear icon also opens Composer for a page, even a page created without Composer.

Under Page Types > Edit Form you can create Control Sets and add Form Controls to those sets.

Choosing Form Controls does not put them on a page. To add them to the page, you need to set the page output - Page Types > Output. You will need to set the output default for every page template that is allowed for that page type.

Under Defaults and Output, click on the template icon or Edit Defaults to place your form control output on your page (this also includes default blocks you want on the page).

You will use the Page Attribute Display block and the Composer Control block to place your Composer output onto the page.
tduncandesign replied on at Permalink Reply
tduncandesign
Very helpful, thank you. Mostly figured out now, but where I seem to find a sticking point is in adding new areas to Page Type Output.

If I setup a page type to take several Form Controls in various areas, that is all good, but if I go back to that page type and add another form control, I am not seeing any way to set that up on existing pages. It appears on any newly created page under that page type.

We used to have a "Setup on Child Pages" command in the Area Contextual Menu. But I saw on Github where Andrew took that out recently. So I guess a path for modifying a Page Type template after the fact might be to dupe that template, add/re-arrange any form controls, then go to each pre-existing page and update to the new Page Type? That would be OK on small sites, but I don't relish doing that to a couple hundred pages of listings. I hope that makes sense, again, I am thinking in context of creating a site for real estate listings, and thinking it's highly likely my client will want to add or take away or re-arrange Form Controls from a page template at some point after the site has already been in use. (Simply cause I've had several requests like that over the years to update the listing page template on his current Wordpress site) Alternately, I guess a new Composer content form control could just be added, and all new pages going forward have it, old pages just don't.

Anyhow, still playing with it, testing, poking at it. Maybe once I get it sussed out, I can write a how-to all in one place. Thanks for your comments.
MrKDilkington replied on at Permalink Reply 1 Attachment
MrKDilkington
Setup on Child Pages appears to be available for blocks that are not configured to use Composer.

Composer Control blocks (blocks that are configured to use Composer) do not have the Setup on Child Pages option available.
tduncandesign replied on at Permalink Reply
tduncandesign
Thanks, I have noticed that the Setup is there for regular blocks...

What strategy would you take if you had to iterate "after the fact", either during design/build or in production, on a page layout template that was entirely (as much as possible) populated via a Composer form?
MrKDilkington replied on at Permalink Reply
MrKDilkington
Good question, I don't know the answer to this.
tduncandesign replied on at Permalink Reply
tduncandesign
It appears that via Sitemap > Page Search, one can bulk-edit Type by selecting multiple pages, clicking on the Type in one of the actual page rows, and choosing Design & Type from the contextual menu that appears.

Thus, I should be able to make a page template "Full" and iterate to "Fullv2", "Fullv3", etc. But probably best to get as much of the content settled during design phase as possible. I'm just anticipating when the client comes back a half a year later and needs such-and-such widget added to all the listing pages.

(eta: I am probably still a bit confused on my "Type" vs "Template" terminology. I need to study up on that some to grok it. )
MrKDilkington replied on at Permalink Reply
MrKDilkington
On the topic of Page Type versus Page Template, community member mesuva wrote a great post about it.

http://www.concrete5.org/community/forums/5-7-discussion/5.7-page-t...
jheanly replied on at Permalink Reply
jheanly
Hi MrK

Sorry to jump in on an old thread, but you seem to have a few answers about Composer and I have a question I can't answer.

I am trying to work out how to apply a custom template to a composer control form block. I have been unsuccessful so far. Do you know how to apply a template to a composer block?

Thanks

James
MrKDilkington replied on at Permalink Reply
MrKDilkington
@Heanly

I am afraid I don't.
dclmedia replied on at Permalink Reply
dclmedia
Hi

I too have been 'playing' with Composer as I think it is a great tool for creating pages.

The problem I have is that I created my own block which works perfectly as a stand-alone block but when I use is in Composer it doesnt save the information entered into the table, it only inputs null values. I have a composer.php file that I am pointing to my form_add_edit.php form which renders perfectly.

Any advice?

Simon.
dclmedia replied on at Permalink Reply
dclmedia
I have found the problem! I was using the C5 input format of
<?php echo $form->text('property_title', $property_title); ?>
Composer doesn't recognise this. I changed this to the more traditional form input with the following in the name variable
<input type="text" name="<?=$view->field('property_title')?>" value="<?=$property_title?>" />


I also had to put the following in my composer.php file
$this->inc('form_add_edit.php', array('view' => $view));
this meant I didnt have to replicate the form_add_edit.php file and the array parses the values between the form, view.php and tables.

Hope this helps anyone else with a similar problem.