Adding a custom template to a parent area

Permalink Browser Info Environment
I am playing with the Parent Area add-on and wondering if it is possible to add a custom template to a parent area. Basically I have defined a block on a parent page that is filled with tons of detailed data. I now want to present alternative views of the data on different "child" pages. I was hoping that I could use your parent area add-on to add a parent area to child pages and then applied a custom template to select and style the information I wished to present. Is this possible? Maybe this is not the way you intended for people to use the add-on.

The new block on the child page is not picking up any of the custom templates I have designed for the parent block. When I copy the custom templates to jl_parent_area/blacks/templates I am able to select the custom templates from the block. Unfortunately after the selection the parent block disappears on the child page and become two red dotted bars above the "add to main" block on the page.

Type: Discussion
Status: New
View Replies: View Best Answer
JohntheFish replied on at Permalink Best Answer Reply
JohntheFish
That is an interesting concept and not something I have never thought about before.

A lot of the clever code in the controller works to get the styling/template from the original block onto the target page.

The block template and block design for Parent Area affect the Parent Area block, not the blocks within that area that Parent area is pulling in.

One concept would be to modify the original block template to remove all styling and inherit styling from a stylesheet on the page. Then use a page specific stylesheet and inherit the contained blocks styling from that.

Another thought would be to modify the parent area controller to be able to specify an alternate template for any of the contained blocks (in place of the actual contained block template). Formigo did something a bit like that with their container addon.
dgreer replied on at Permalink Reply
John,

Thanks for the quick reply. You presented some great ideas for approaching the problem. I am learning alot from looking at your code. Thanks for the great add-on and the help in learning concrete5.

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.