Hello,

I am trying to add a custom layout to Composite Layout themes folder. I downloaded the sample from the custom layouts thread, but the new layout is not appearing when I go to add a content type that has composite layouts enabled.

I think it may be an issue with the names of the files? At first, I had the name of the layout twocol-twothirds. So, I replicated the files and I have the following files uploaded:

composite_layout_twocol_twothirds.inc
-> In this file, I have the following statement (because it said to keep it like this if you don't want to change settings):

function template_preprocess_composite_layout_twocol_twothirds($variables) {
}

composite-layout-twocol-twothirds.css
composite-layout-twocol-twothirds.icon.png
composite-layout-twocol-twothirds.tpl.php

Can you tell if I am doing anything wrong with these file names?

Thanks!

CommentFileSizeAuthor
#6 layout_twocol_sixtythirty.zip2.6 KBmalancheril

Comments

bengtan’s picture

Your filenames look okay so far.

What you might want to check is ...

Custom composite layouts should be added via a separate module, not into the composite/theme directory or anywhere within the Composite Layout module directory.

Is your custom layout done as a separate module?

pcas00’s picture

No, I put the composite layouts in the same composite module themes folder. I thought this beta version had the custom layouts feature included? Could you direct me to which module I need to install in order for this functionality?

Thanks!

bengtan’s picture

Status: Active » Fixed

No, you shouldn't put custom layouts into the Composite Layout module.

You should create your own module which contains definitions for your custom layouts. Please see comment #13 of #503320: custom layouts for an example of such a module. Thank you.

pcas00’s picture

Status: Fixed » Needs review

Okay, yeah I had worked with some of those files but I am a little confused. Where do I upload these files? Does it matter? I wasn't sure if it should be within the composite folder? Are there any instructions for going about adding these the correct way?

Thanks

bengtan’s picture

The example from comment #13 of #503320: custom layouts is a separate module, much like Composite Layout is a module. Hence, it should be placed in the filesystem under either .../sites/default/modules or .../sites/all/modules. Then you have to visit the url .../admin/build/modules on your site and enable the module.

See http://drupal.org/getting-started/install-contrib/modules for more information about installing modules.

malancheril’s picture

StatusFileSize
new2.6 KB

Hi,
Great module. I've gotten a lot of use out of it. However, I am having difficulty with simply cloning the sample module but with a different layout. I am attaching the module.

I thought I had all the naming right. it shows up as a module and I am able to select it. It shows up as a choice in a node edit form as a possible option (although the icon doesn't show up). But when I select it and save and view the node, I get this error:

* warning: include(./sites/all/modules/layout_twocol_sixtythirty/composite-layout-sixtythirty.tpl.php) [function.include]: failed to open stream: No such file or directory in /home/malanche/public_html/includes/theme.inc on line 1066.
* warning: include(./sites/all/modules/layout_twocol_sixtythirty/composite-layout-sixtythirty.tpl.php) [function.include]: failed to open stream: No such file or directory in /home/malanche/public_html/includes/theme.inc on line 1066.
* warning: include() [function.include]: Failed opening './sites/all/modules/layout_twocol_sixtythirty/composite-layout-sixtythirty.tpl.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/malanche/public_html/includes/theme.inc on line 1066.

Any suggestions?

bengtan’s picture

Status: Needs review » Fixed

Please post a new issue for comment #6.

Status: Fixed » Closed (fixed)

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