Hi, I thought I'd ask this again, in case my message got lost over the
weekend. The Manakin theme tutorial on the wiki suggests a few
alternative methods for including static pages in a DSpace site using
XMLUI. I have attempted to use option 1, which involves modifying the
template.xsl for the theme to pull in static content. I have not been
successful in getting this to work. Even if I did manage to get the
content to appear in the body of the site, I believe I'll need to
duplicate the same logic in order to change the title attribute for the
page (which, if you follow the example code, gets set by the system to
"page not found").

So, what I'm interested in trying now is option 2:

"2. Cocoon-based method. You could use cocoon to check the url right
after the generation step, and then add in your own static DRI page.
This method requires that all your static pages be expressed as DRI and
then transformed into HTML by your standard theme templates. This method
is useful if you will have lots of static pages that need to be managed,
but requires modifying the cocoon sitemap.xmap"

Has anyone tried this successfully? I'd love to see an example or two.
Would someone be interested in sharing one with me, or with the list?

If anyone does have an example, I will commit to adding it to the wiki,
once I've got the code working.

Thanks!

--Hardy  

> -----Original Message-----
> From: Pottinger, Hardy J. [mailto:[email protected]] 
> Sent: Thursday, February 12, 2009 10:26 PM
> To: Diggory Mark; Van Ly
> Cc: [email protected]
> Subject: Re: [Dspace-tech] adding static pages to a DSpace 
> site using xmlui
> 
> Hi, thanks Mark and Van, mvn and ant move these new files just fine
> (they are where you suggested, Mark). My issue is that the 
> modification
> to template.xml suggested by the wiki...
> 
> http://wiki.dspace.org/index.php/Manakin_theme_tutorial#Adding
> _static_pa
> ges
> 
> ...does not appear to work. I did try to feed "xsl:copy-of select" the
> full path (/themes/[your-theme]/pages/add.xml), as I thought 
> maybe that
> was what you were suggesting, but I'm still seeing a Page not found
> error in the title of the page, and a blank body (i.e. all the other
> normal DSpace content is there, just the body section is blank). I can
> definitely confirm the files are all where they are supposed to be.
> 
> >From your responses, I am assuming that, to add static 
> content, you have
> just added a static xhtml page and linked directly to it? 
> What I'm after
> is adding some basic static content within the DSpace site 
> framework, so
> that other dynamic aspects, namely login, persist on the page.
> 
> One other option mentioned on the wiki is:
> 
> "2. Cocoon-based method. You could use cocoon to check the url right
> after the generation step, and then add in your own static DRI page.
> This method requires that all your static pages be expressed 
> as DRI and
> then transformed into HTML by your standard theme templates. 
> This method
> is useful if you will have lots of static pages that need to 
> be managed,
> but requires modifying the cocoon sitemap.xmap."
> 
> But this isn't fleshed out in as much detail, and I'm not sure I
> understand what it is I'd need to do with the sitemap.xmap file to get
> it going. If anyone has tried this approach, could you 
> forward a sample
> to me? I haven't the foggiest idea how to express something as DRI
> [hangs head in shame], but this would probably be a fantastic way to
> learn! :-)
> 
> The final option mentioned, using Apache to proxy to/from another
> server, is my failsafe option... I'm sure I could get that 
> working, but
> it would not be ideal.
> 
> --Hardy  
> 
> > -----Original Message-----
> > From: Diggory Mark [mailto:[email protected]] 
> > Sent: Thursday, February 12, 2009 7:28 PM
> > To: Van Ly
> > Cc: Pottinger, Hardy J.; [email protected]
> > Subject: Re: [Dspace-tech] adding static pages to a DSpace 
> > site using xmlui
> > 
> > The best location is
> > 
> > [src]/dspace-1_5_1/dspace/modules/xmlui/src/main/webapp/themes
> > /[your-theme]/...
> > 
> > This will allow you to access them from that path 
> > "/themes/[your-theme]"
> > 
> > I believe the location below will not work. I have only been 
> > able to access files located within "themes".
> > 
> > Mark
> > 
> > On Feb 12, 2009, at 11:10 PM, Van Ly wrote:
> > 
> > 
> >     Hi, perhaps you add your files to 
> >      
> >      
> > [src]/dspace-1_5_1/dspace-xmlui/dspace-xmlui-webapp/src/main/webapp
> >      
> >     and run 'mvn package' followed by ant.
> >      
> >     -- Van Ly : University of Sydney Library
> >     
> > ________________________________
> > 
> >     From: Pottinger, Hardy J.
> >     Sent: Fri 13/02/2009 5:06 AM
> >     To: [email protected]
> >     Subject: Re: [Dspace-tech] adding static pages to a 
> > DSpace site using xmlui
> >     
> >     
> >     Hi, let me ask this question in a different way. If 
> > you've added static
> >     pages (a FAQ, an about page, etc.) to a DSpace site 
> > using xmlui, how did
> >     you go about it? Thanks!
> >     
> >     --Hardy  
> >     
> >     > -----Original Message-----
> >     > From: Pottinger, Hardy J. [mailto:[email protected]] 
> >     > Sent: Wednesday, February 11, 2009 4:25 PM
> >     > To: [email protected]
> >     > Subject: [Dspace-tech] adding static pages to a DSpace site 
> >     > using xmlui
> >     > 
> >     > Hi, I am using DSpace 1.5.1, on a development 
> > instance running on my
> >     > Windows notebook, and I'm attempting to follow option 
> > #1 (XSL-based
> >     > method) from the Manakin theme tutorial on the wiki, 
> > for adding static
> >     > pages:
> >     > 
> >     > http://wiki.dspace.org/index.php/Manakin_theme_tutorial#Adding
> >     > _static_pa
> >     > ges
> >     > 
> >     > I will paste some code snippets below, but first the 
> > problem: when I
> >     > navigate to http://localhost:8080/xmlui/add, the body 
> > of the page is
> >     > blank, and the title of the page reads "Page not found".
> >     > 
> >     > I'm sure I'm missing something obvious. I have 
> > confirmed that the file
> >     > "add.xml" is in a subfolder of the theme folder, 
> > called "pages".
> >     > 
> >     > Any ideas? TIA.
> >     > 
> >     > 
> >     > Here's the override code for the main body template, 
> > which I'm using:
> >     > 
> >     >     <xsl:template match="dri:body">
> >     >         <div id="ds-body">
> >     > 
> >     >             <ul id="ds-trail">
> >     >                       [snip, not important]
> >     >             </ul>
> >     > 
> >     >             <xsl:if
> >     > test="/dri:document/dri:meta/dri:pageMeta/dri:metada...@elemen
> >     > t='alert']
> >     > [...@qualifier='message']">
> >     >                 <div id="ds-system-wide-alert">
> >     >                               [snip, not important]
> >     >                 </div>
> >     >             </xsl:if>
> >     > 
> >     >            <!-- Check for the custom pages: add, 
> > about, help -->
> >     > 
> >     >            <xsl:choose>
> >     >                <xsl:when
> >     > test="/dri:document/dri:meta/dri:pageMeta/dri:metada...@elemen
> >     > t='request
> >     > ']...@qualifier='URI']='add'">
> >     >                    <xsl:copy-of 
> > select="document('pages/add.xml')" />
> >     >                </xsl:when>
> >     >                <xsl:when
> >     > test="/dri:document/dri:meta/dri:pageMeta/dri:metada...@elemen
> >     > t='request
> >     > ']...@qualifier='URI']='about'">
> >     >                    <xsl:copy-of 
> >     > select="document('pages/about.xml')" />
> >     >                </xsl:when>
> >     >                <xsl:when
> >     > test="/dri:document/dri:meta/dri:pageMeta/dri:metada...@elemen
> >     > t='request
> >     > ']...@qualifier='URI']='help'">
> >     >                    <xsl:copy-of 
> > select="document('pages/help.xml')" />
> >     >                </xsl:when>
> >     >                <!-- Otherwise use default handling of body -->
> >     >                <xsl:otherwise>
> >     >                    <xsl:apply-templates />
> >     >                </xsl:otherwise>
> >     >            </xsl:choose>
> >     > 
> >     >         </div>
> >     >     </xsl:template>
> >     > 
> >     > And here's the very basic pages/add.xml file I'm using:
> >     > 
> >     > <h1 xmlns="http://di.tamu.edu/DRI/1.0/"; 
> > style="font-size: 200%;"
> >     > class="ds-div-head">Add to MOspace</h1>
> >     > <div id="file_news_div_news" class="ds-static-div primary">
> >     > <p class="ds-paragraph">more content coming soon...</p>
> >     > </div>
> >     > 
> >     > --
> >     > HARDY POTTINGER <[email protected]>
> >     > University of Missouri Library Systems
> >     > http://lso.umsystem.edu/~hardy/
> >     > "No matter how far down the wrong road you've gone,
> >     > turn back." --Turkish proverb
> >     > 
> >     > --------------------------------------------------------------
> >     > ----------------
> >     > Create and Deploy Rich Internet Apps outside the browser with 
> >     > Adobe(R)AIR(TM)
> >     > software. With Adobe AIR, Ajax developers can use existing 
> >     > skills and code to
> >     > build responsive, highly engaging applications that combine 
> >     > the power of local
> >     > resources and data with the reach of the web. Download the 
> >     > Adobe AIR SDK and
> >     > Ajax docs to start building applications 
> >     > today-http://p.sf.net/sfu/adobe-com
> >     > _______________________________________________
> >     > DSpace-tech mailing list
> >     > [email protected]
> >     > https://lists.sourceforge.net/lists/listinfo/dspace-tech
> >     > 
> >     
> >     
> > --------------------------------------------------------------
> > ----------------
> >     _______________________________________________
> >     DSpace-tech mailing list
> >     [email protected]
> >     https://lists.sourceforge.net/lists/listinfo/dspace-tech
> >     
> > --------------------------------------------------------------
> > ----------------
> >     Open Source Business Conference (OSBC), March 24-25, 
> > 2009, San Francisco, CA
> >     -OSBC tackles the biggest issue in open source: Open 
> > Sourcing the Enterprise
> >     -Strategies to boost innovation and cut costs with open 
> > source participation
> >     -Receive a $600 discount off the registration fee with 
> > the source code: SFAD
> >     
> > http://p.sf.net/sfu/XcvMzF8H__________________________________
> > _____________
> >     DSpace-tech mailing list
> >     [email protected]
> >     https://lists.sourceforge.net/lists/listinfo/dspace-tech
> >     
> > 
> > 
> > ~~~~~~~~~~~~~
> > Mark R. Diggory
> > http://purl.org/net/mdiggory/homepage 
> > <http://purl.org/net/mdiggory/homepage> 
> > 
> > 
> > 
> > 
> 
> --------------------------------------------------------------
> ----------------
> Open Source Business Conference (OSBC), March 24-25, 2009, 
> San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing 
> the Enterprise
> -Strategies to boost innovation and cut costs with open 
> source participation
> -Receive a $600 discount off the registration fee with the 
> source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> DSpace-tech mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
> 

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to