How does the module see my patterns

trevortwining - April 17, 2009 - 12:23
Project:Patterns
Version:6.x-1.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:postponed (maintainer needs more info)
Description

I have a YAML pattern I've created. I've placed it in the patterns folder wtihin the patterns module, but it doesn't show up in the list. A copy of it is below. I have spyc downloaded and it seems like it's working because it recognized the sample yaml pattern (also in the same directory).

Oh, and I've also flushed all the caches via devel.module, just in case that was a problem.

What should I be checking next?

#1

trevortwining - April 17, 2009 - 12:24
AttachmentSize
pvblock.yaml_.txt 315 bytes

#2

ChrisBryant - April 18, 2009 - 02:55

I just downloaded this file and made sure it was named pvblock.yaml and put it in the modules/patterns/patterns/ folder and it showed when reloading the patterns listing admin page.

The two things to check are:

1. Make sure it's named pvblock.yaml and not pvblock.yaml_

2. Make sure that the pattern is placed in the modules/patterns/patterns/ folder or a sub folder of that. ie: modules/patterns/patterns/provision/pvblock.yaml.

Also, note that you can keep your patterns in one of the following folders which are better places to keep your patterns:

/sites/all/patterns/
/sites/default/patterns/
sites/sitename/patterns/

You can also organize them with sub-folders and they will still be recognized.

This way when you update the module you don't have to worry about the files in the patterns module folder.

Let us know if that does the trick or if we need to debug further.

#3

vaish - May 1, 2009 - 06:02

Hi Trevor,

Could you please confirm if suggestions in #2 solved your problem?

Thanks,
Vaish

#4

cdale - May 1, 2009 - 12:59

It doesn't look in /sites/all/patterns does it? Be cool if it did though, but from looking at the code, it would not appear that it does.

#5

vaish - May 15, 2009 - 10:49

It didn't look at 'sites/all/patterns' till now. I just added and committed that line. Thanks for mentioning.

Also, small clarification regarding the other paths searched for patterns:

/sites/default/patterns/
sites/sitename/patterns/

Above two paths are mutually exclusive. Patterns will search either one or the other but not both. "Default" is actually kind of a special case for "sitename", i.e. if "sitename" folder doesn't exist then "default" is used.

#6

vaish - May 15, 2009 - 10:52
Status:active» postponed (maintainer needs more info)

Changing status to "need more info" until I hear back from Trevor.

 
 

Drupal is a registered trademark of Dries Buytaert.