I would like to display information related to the main content on the page in the left and right sidebar of my pages, using my theme's css setup for blocks and columns. So I tried to use views, but that seemed backwards since I wasn't trying to display a list of things, just information related to the same content, just put some of it in the sidebar areas and some of it in the main content areas. So I started playing around with Content Template, which allowed me to easily edit the output of my fields and the layout, but I still have the problem of how to put related information in the left and right sidebar areas. Then I found Composite Layout and now I can put related stuff in the left and right sidebar easily, but I'm not sure how to tweak the output layout/design of the main content area and it doesn't use my theme settings for blocks in the right and left sidebar areas. I hope this makes some sense. Is it possible to use composite layout and also be able to customize the output layout/design in the main content area and is it possible to use my theme's block and column css settings for the information that shows up in the right and left columns? I haven't tried it yet, but if I wanted to add a block or view to the left, main or right columns, is that possible?

Sorry for all the questions. I hope I explained the situation clearly. Thank you.

Comments

bengtan’s picture

Hi,

Firstly, I would suggest you not use Content Template. That will clash with Composite Layout, as they both use the same module hook so one will overwrite the other.

The reason why Composite Layout won't obey your blocks & sidebar themeing is because the zones are not blocks. They look like blocks to us humans, but in the html rendered by the browser, they are not blocks. Zones are displayed within the node itself.

If you want to customise composite layout themeing, you can start by overriding the CSS styles in .../composite/composite.css or .../composite/theme/*.css, but you should override that in your own Drupal theme. Don't modify the composite css files.

And then if you need more control, you can override the .tpl.php files in .../composite/theme/*.tpl.php. Again, this overriding is done in your Drupal theme. Don't modify the files in composite.module itself.

Does that help?

rmassamiri’s picture

Yes, I think that helps. I will go give it a go and hopefully I can figure it out. Thank you.

bengtan’s picture

Status: Active » Fixed

Presumed fixed due to no further information.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

dellis’s picture

Does it still hold that using a composite layout will override the content template's customizations of the content type's display?

If it does, do I understand it correctly that:

for pages that don't involve composite layouts, the content template's layout will still work, but when composite layouts are included in the page it won't?

In your prosepoint version, you have a "headline" and "other stories" groupings and the presentation of those two categories is governed by a template somewhere? How would I add new templates for custom content types that would work with your module?

Thanks.

bengtan’s picture

> Does it still hold that using a composite layout will override the content template's customizations of the content type's display?

If you are using both modules Composite Layout and Content Template, they will clash with each other because they both use the same plugin hook (nodeapi -> alter). I don't know which will override the other, but I wouldn't depend on it since the order is not guaranteed by Drupal core to stay the same.

> for pages that don't involve composite layouts, the content template's layout will still work,

I believe this is the case, but if you observe otherwise, let me know.

> but when composite layouts are included in the page it won't?

I believe there will be a clash with undefined results (as explained above).

The Headlines and Other Stories 'groupings' is just a CCK nodereference field. There is a submodule Composite Layout Fields (included with Composite Layout) which exposes CCK fields as Composite Layout items). There is no special theme template for the parent content type, nor was one needed.

> How would I add new templates for custom content types that would work with your module?

Same as usual. Add a file like node-story.tpl.php to your theme. If you don't know what I'm talking about, please look up the Drupal 6 themeing guide.

Finally, if you need to follow this thread up, please consider starting a new issue.

khoa_nguyen’s picture

I am new to drupal, I have read your comment, just would like to know how I can override the .tpl.php files in .../composite/theme/*.tpl.php in Drupal theme, I need to do this for my project.

Thanks.

bengtan’s picture

@7:

Copy the file .../composite/theme/composite-content.tpl.php into your theme (can't remember if it needs to be in the main directory or if a subdirectory will do). Then copy any other *.tpl.php files (that you want to override) into your theme.

Then clear your theme registry (or your site's cache) so Drupal scans your theme and finds the new *.tpl.php files.

Then you can make any changes you want to the *.tpl.php files.

And if you have problems with this, please open a new issue and let this one remain. Thank you.