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.
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: | Archived |
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.