|
View:
New views
1 Messages
—
Rating Filter:
Alert me
|
|
|
Adding a popup / lightbox style for document links.What I am trying to do: Lets say I have three daisy documents, a 'main' document called 'Einstein' and two 'subject' documents called 'special relativity' and 'general relativity'. Inside the main Einstein document there are links to the subject documents on the 2 theories. When I click on the link to one of the theory documents, instead of going to this page like the normal daisy way I want it to open in a pop-up/lightbox type of window. Then the user can read this short document, click on the window to close it and they are still in the same place. I already have a hack of this working with the javascript library fancybox.net(based on jquery). Under document-styling/html I created a SimpleDocument.xsl and I find the links to these subject documents because of a hack that I look for a special character in the document name. Then I add a class attribute to the link 'a' element, this class activates the fancybox javascript. The other files I changed is the layout.xsl to include the fancybox javascript and css. In layout.xsl I also look in the document name(a hack) to see if it is one of the 'subject' documents and I use the 'plainLayout' template so the content in the pop-up does not have the header, footer and navigation. Some things I am trying to figure out: 1. I am looking for a way to indicate that a specific link to a daisy document, ie. 'href=daisy:2-DSY', is to be styled as a popup. My current hack is a cheat based on the document name. I tried editing the xml and adding a class to the 'a' element but the cleaner removes it. I could make these a specific document type but I may not always want my links to these 'subject' documents to be a pop-up. I really want meta-data on the link itself. One option would be to add some kind of code like {popup} to the text of the link and then strip it out, this is a little ugly but could work. 2. Once I have identified the links to style as a pop-up, I am looking for a way to modify the resulting href to have something like '?layoutType=plain' The way I am doing this now is a hack based on the document name. And this is also the place where I will add a class to the link element. 3. I am trying to figure out where in the skinning or transforming process does 'href=daisy:2-DSY' get converted to 'href=/somepath/2-DSY.html' This could be a place where I could add the layoutType. 4. I am also looking for some documentation on the xml that is fed to SimpleDocument.xsl or document-to-html.xsl. I found the layout.xsl input XML specification, is ther one for the document? I tried adding a cocoon-view in the sitemap but could not find a spot to get this output. Any help will be appreciated :) -chris _______________________________________________ daisy community mailing list Professional Daisy support: http://outerthought.org/en/services/daisy/support.html mail to: daisy@... list information: http://lists.cocoondev.org/mailman/listinfo/daisy |
| Free embeddable forum powered by Nabble | Forum Help |