----- Original Message ----- From: "Ross Gardler" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Sunday, January 22, 2006 2:00 AM Subject: [spam score=82%] Re: Best way to add repeatable code in v2/v3 (was Re: Example use case)
| Gav.... wrote: | > Hi All, | > | > On the right hand side of http://minitutorials.com I have some 'headlines' | > in a 'headlines' div | > All boxes are in a 'rightbar' div also. | > The code for this is in One file called rightnav.ssi and included using | > either 'include' or 'require' | > This obviously has the effect that all of the site pages get the content | > from the one file. | | ... | | > 3. The html code required I transfered from rightnav.ssi into rightnav.html | > and put this file | > into xdocs directory. I am hoping that the <url>/rightbar.html</url> is | > therefore correct. | > | > 4. Didn't see what else I would need to do, so did a 'forrest run' , did not | > show up. | > Also did a ForrestBot onto the web server, also does not show up. | > | > So, this did not work, the question is, have I done something wrong, missed | > something out | > or is there a different/better way to include content into the 'headlines' | > hook ? | | I've not checked your syntax as I am not familiar enough with these | contracts to see it without cross-checking with the documentation, which | I assume you have done. Others will be better at spotting syntax errors. It seems correct from the docs I could find. The docs do specify that the included file needs to be a forrest generated html source file. Putting in rightnav.html into xdocs doesn't seem to be enough, as it is not being linked to from anywhere (apart from this contract), then I guess it is not being generated - a rightnav.html does not get reproduced into a generated site. | | Assuming syntax is correct. Have you verified that requesting | "http://localhost:8888/rightbar.html" actually returns some code? No it doesn't, I get a can not find rightbar.xml error | | The other thing is that I wrote this contract for V1. There have been | many changes since then, including the use of JX. I'm not sure if this | is still the "right" way to include content. It seems most of the newer contracts are using JX, maybe v2/v3 need it to be this way. Any mention of JX on the forrest site says to refer to cocoon docs for howto's , I don't really want to start wandering in that direction though. | | > Alternative I thought of would be to create a contract for it. Although I | > can see how to | > create a contract, not sure again on the best way of approaching it. Maybe | > doing a similar | > thing as including the body from say index.xml but using | > rightnavcontent.xml, use jx: ?? | | See above - we need a views savvy dev to advise here. Good idea, I'll wait for them to wake up and flood the list :) | | > (Re-reading the above, I see at least (at last ?) I have suggestions, so | > must be learning something!) | | :-) and you're teaching those of us still trying to get to grips with | views (when I taught at Universities I always used to learn loads by | doing the labs when students would ask me why their code behaved this | way or that way). | | > P.S- | > | > Creating an empty hook has the side effect of a self closing div - obviously | > inlvalid and messes | > up the rest of the page. | | Raise an issue (if there isn't one already, this is ringing a bell | somewhere in the deep recesses of my mind). I will raise an issue, I had a good look for one but could not find a relevent one. Gav... | | Ross | | | -- | No virus found in this incoming message. | Checked by AVG Free Edition. | Version: 7.1.375 / Virus Database: 267.14.21/236 - Release Date: 20/01/2006 | | -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.14.21/236 - Release Date: 20/01/2006
