# Changing .lrweb file causes engine to disappear from web gallery selection list



## johnsjason (Aug 26, 2010)

With the permission of Matthew Campagna of TTG, I'm making some personal changes to the TTG slimbox gallery generator to suit my needs.

Right now, I have a web template for my galleries, but it requires alot of cutting & pasting to add the slimbox gallery to the template, and I would like to add that template to the web engine so the page will come out whole and no editing needed.

The changes are 6 CSS ID's added within the ["appearance.className.cssID"] section, and as far as I can tell, the syntax and punctuation are correct. In addition, I altered the header.html file to create both the text banner and the CSS-based navigation bar, which both rely on the IDs added within the .lrweb file.

The IDs added are not referenced by any functions within the file, as they are intended to be hard-coded to the exported gallery.css file.

One of the changes I made to the header.html file was to delete several dynamic references from the web engine, all of which never had any settings.

What are some of the possiblities for the engine no-show?


----------



## johnbeardy (Aug 26, 2010)

It only takes a little mistake to invalidate a template. That's probably what you've done.


----------



## johnsjason (Aug 26, 2010)

Oh, believe me I know that! one assignment I was working on for school, a 15'' LOC program wouldn't execute right since I had the wrong variable included in a formula. The difference was two swapped letters. Thats when I learned to make my variable & method names much more distinct from each other.

If an error is in the header.html file, would that cause the engine load failure?


----------



## johnbeardy (Aug 26, 2010)

Yes, anywhere in the engine. Have you restarted LR and temporarily switched to another engine?

John


----------



## johnsjason (Aug 26, 2010)

Ok, narrowed it down to the .lrweb file. I replaced the edited header with the original & started up LR with the edited .lrweb file & it didn't load.

I think there are three places where I could have screwed up. I was following the syntax & format of the file as best as I could, but there are some places where the code is ambiguous and the SDK manual is not all that helpful.


```
--class names I selected to reflect the property name. All follow the basic syntax
["appearance.mattblackmenuul.cssID"] = ".mattblackmenu ul",
["appearance.mattblackmenulilink.cssID"]= ".mattblackmenu li a",
["appearance.mattblackmenulivisited.cssID"] = ".mattblackmenu li a:visited",
["appearance.mattblackmenuliselected.cssID"] = ".mattblackmenu li a:selected",

["appearance.mattblackmenuul.margin"] = "' auto -416px '",
["appearance.mattblackmenuul.border-bottom"] = "1px solid gray",
```

All the other engines work fine. Its just the edited .lrweb file that's screwing things up.

You didn't answer one of my questions though. Do the CSS ID's have to be referenced by a function in order to be valid? These ID's are basically non-referenced variables that are only there to be added to the gallery.css file upon export.


----------



## johnsjason (Aug 27, 2010)

Solution Found

I ended up doing a workaround. Rather than having the new CSS tags included in the gallery.css file on export, I modified the head.html to include the CSS within the &lt;style&gt;&lt;/style&gt; tags & header.html to have my template header & nav bar structure. Its not as elegant as hacking the lrweb file to include the data on export, but it works.


----------



## Sean McCormack (Aug 30, 2010)

If you're not changing the appearance of CSS within Lightroom, you are much better off using a separate CSS file. Lightroom CSS mangles the order, so it's hardly a 'cascading' style sheet. Make sure you include the CSS file in the manifest.lrweb file too.


----------



## johnsjason (Aug 30, 2010)

Where would I add the separate CSS file in the manifest file? The section

AddCustomCSS{
  filename= 'resources/css/gallery.css',
}

Gallery.css has a specific reference within the engine.lrweb file and that's where those CSS tags come from. You are right, the order is certainly mangled beyond readability. But how do I get the engine to export the additional CSS file?


----------



## Sean McCormack (Sep 1, 2010)

No, add it as a Resource. The reference it in the HTML
Personally I create a Resource folder and then just put all the additional stuff I need for the gallery in there. 

AddResources {
	source='resources',
	destination='resources',
}


----------

