easy way to set default blocks with formatting

Permalink
I have a default page, and I have added some blocks to it, so when I create a new page the blocks are included automatically. Cool stuff.

I would like to include some extra formatting on these default blocks - for example i have a content area that i would like to include a top and bottom border. But when I am editing the default blocks on the page, when i click on a block it does not show the design menu item so I can change the borders.

Is there a simple way to do this? Thanks.

sceva
 
elyon replied on at Permalink Best Answer Reply
elyon
Will it let you apply a custom template? You may be able to apply a custom template by default, which includes all of the styles you need to apply.

If you haven't done a custom template before, it goes like this:

Find the directory for the block you want to template. For example, the Content block is located under /concrete/blocks/content. Copy it's "view.php" file. Now paste it in a templates folder. For example, for the Content block, you would want to paste it under /blocks/content/templates. Go ahead and rename it to something meaningful, like "default_borders.php". Now when you add a Content block, you can click it and select custom template. "Default Borders" should appear on the list, which uses your new file instead of the default file. With that working, you can go into "default_borders.php" and wrap the existing code with your own DIV tag with some inline styles or a CSS class.

In the long run that may work out better, because you'll be able to control that style from your theme's stylesheet, no matter where the template is used, and you won't run the risk of ending up with pages that have slightly different styles, or worse, having to go back through and edit them all when you want to make a change. I know the "Save Design" feature helps a lot but it still might work best in this case to use a template
sceva replied on at Permalink Reply
sceva
I have taken your advice on creating custom templates where I can, and using some creativity where I can't...

In a content block, I just include the css style options I want in the html view when editing the content of the block. This works well because I can copy the original and paste it into the scrapbook, and then when I retrieve it I have no changes.

I was unable to figure out how to edit the form block, so (thanks to the presets in 5.4!) I created a preset design, and just apply that whenever I need it. It will also allow easy changes, because if you change the design, you can apply it to everywhere it is used.

Thanks. C5 is getting awesomer.