Filled in Composer, now: How to show content?

Permalink
Hi

WARNING:
I'm very new to Concrete5

SCENARIO:
I must be missing something vital.

I have created attributes.
I have created a page type
I have assigned attributes to page type.
I have added attributes to page-type form.
I have created new page of this page type.
Filled in the composer form
Save and View the page... not a lot.

QUESTION:
What is the link between filling in composer and viewing the info on the page?

I will add more info later today

Thanks for helping

Bucklash
 
Gondwana replied on at Permalink Reply
Gondwana
There's some info at
http://documentation.concrete5.org/developers/working-with-pages/ge...

You'll probably need to specify how to display (or otherwise use) the attributes in a view.php and/or controller.
Bucklash replied on at Permalink Reply
Bucklash
Hi


Thanks for assisting.

To clarify:

So if I create a custom attribute (like a select list) and add it to a page type, it won't show unless I also alter all view.php files that I want it to show on?

Jon
Gondwana replied on at Permalink Reply
Gondwana
That's my understanding, but my understanding is tenuous. c5 won't know what to do with your attribute unless you tell it.

If you don't want to create a full-on block or page template, you can get access to attributes using this:
https://www.concrete5.org/marketplace/addons/php-code-block...

Code to display the 'meta_title' attribute:
<?php
    $c = \Page::getCurrentPage();
    echo $c->getAttribute('meta_title');
?>


Beware, the php block isn't for the faint-hearted; nor will it give you the flexibility of your own block/template.

Hopefully someone who knows what they're talking about will come along soon. :)
Bucklash replied on at Permalink Reply
Bucklash
Hi

Thanks Gondwana, useful tips.
I appreciate your time.

I will alter view.php's as I see fit, seems like a good habit to get in to.


Jon
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi Bucklash,

If I understand your question correctly, I believe you are looking to edit the page type defaults.

"After you create your page type and the page type's form, you need to edit the defaults for the output. This tells concrete5 where to put the Composer information on the page. If your page type is set up to use multiple page templates, you will need to edit the defaults for each page template.

- on the Page Types page, find your Special Offer page type
- click the Output button for Special Offer
- on the Defaults and Output, you will see a list of page templates available for that page type
- click the Edit Defaults button for one of the page templates
- on the defaults page for the template, you can add blocks that will be defaults for that page template and also page attributes and built-in properties
- to add a Composer form block, you will use the Composer Control block (at the bottom of the list of blocks in the block panel)
- after adding it to the page, the Composer Control block will list available blocks that can be added in a select-dropdown
- attributes are added using the Page Attribute Display block
- the Page Attribute Display block will have a Property to Display select drop-down of available attributes and built-in properties you can add to the page
- exit edit mode and do the same for any additional page templates"

https://www.concrete5.org/community/forums/customizing_c5/access-com...
Bucklash replied on at Permalink Reply
Bucklash
Hi
Yes, yes, yes

That is just the info.

Thank you