Page Description in Block Area?

Permalink
Is there a way to copy the page description into a block area that can still be edited using TinyMCE?

 
jordanlev replied on at Permalink Reply
jordanlev
You could create a custom block with Designer Content (http://www.concrete5.org/marketplace/addons/designer-content... ), add a WYSIWYG field and set some text as the default value (for now just put in something like "PAGE NAME GOES HERE").
After you've created the block, edit its controller.php file (in YOURSITE/blocks/your_block/controller.php) and find the "add" function, and change this:
$field_1_default_content = 'PAGE NAME GOES HERE';

...to this:
$field_1_default_content = Page::getCurrentPage()->getCollectionName();


Then you can add that custom block to the Page Defaults so it appears on every new page by default.

This website stores cookies on your computer. These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media. To find out more about the cookies we use, see our Privacy Policy.