[opencms-dev] drop-down menus, database access

Paul-Inge Flakstad flakstad at npolar.no
Tue Apr 19 18:44:45 CEST 2011


Hi again Marko,

1. http://opencms-wiki.org/Creating_Navigation will give you an idea 
of how to control the navigation. The drop-down part is javascript, 
you can implement that any way you like to.

Can't help you with the other question. (Though I don't think there's 
an easy way.)

Cheers,
Paul

> -----Original Message-----
> From: opencms-dev-bounces at opencms.org 
> [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Marko Riedel
> Sent: 19. april 2011 18:15
> To: The OpenCms mailing list
> Subject: [opencms-dev] drop-down menus, database access
> 
> 
> Dear friends,
> 
> thanks for helping me out, this was not difficult and it 
> worked right away. I need two more pointers, presumably to tutorials.
> 
> 1. An example of how to add a menu bar with drop-down menus 
> to the top of the pages of a website.
> 
> 2. How to migrate a website that uses PHP to access a MySQL 
> database to jdbc:mysql.
> 
> Again, a pointer to some sample code would suffice.
> 
> Thanks!
> 
> Regards,
> 
> Marko Riedel
> 
> 
> +---------------------------------------------------+
> | Marko Riedel, markoriedelde at yahoo.de              |
> | http://www.mathematik.uni-stuttgart.de/~riedelmo/ |
> +---------------------------------------------------+
> 
> 
> --- Paul-Inge Flakstad <flakstad at npolar.no> schrieb am Mo, 18.4.2011:
> 
> > Von: Paul-Inge Flakstad <flakstad at npolar.no>
> > Betreff: Re: [opencms-dev] file modification time
> > An: "The OpenCms mailing list" <opencms-dev at opencms.org>
> > Datum: Montag, 18. April, 2011 17:24 Uhr
> > Hi Marko,
> > 
> > This is what I use:
> > 
> > <%@ page import="java.util.Locale,
> >              
> >    java.util.Date,
> >              
> >    java.text.SimpleDateFormat,
> >              
> >    org.opencms.jsp.*,
> >              
> >    org.opencms.file.*,
> >              
> >    org.opencms.util.*" 
> > %><%
> > CmsJspActionElement cms = new
> > CmsJspActionElement(pageContext, request, response);
> > CmsObject cmso = cms.getCmsObject();
> > String requestFileUri = cms.getRequestContext().getUri();
> > Locale locale = cms.getRequestContext().getLocale();
> > 
> > // See java.text.SimpleDateFormat for date format
> > definitions
> > final String PAGE_DATE_FORMAT = "MMMM dd yyyy";
> > 
> > // The resource to investigate
> > CmsResource res = cmso.readResource(requestFileUri);
> > 
> > // The user who created the resource
> > CmsUser creatorUser = cmso.readUser(res.getUserCreated());
> > String creatorName  = creatorUser.getFirstname() + " "
> > + creatorUser.getLastname();
> > 
> > // The user who modified the resource
> > CmsUser modUser =
> > cmso.readUser(res.getUserLastModified());
> > String modifierName = modUser.getFirstname() + " " +
> > modUser.getLastname();
> > 
> > // The resource's timestamps, as Date objects
> > Date modifiedDate = new Date(res.getDateLastModified());
> > Date createdDate = new Date(res.getDateCreated());
> > 
> > // The desired date format
> > SimpleDateFormat dFormat = new
> > SimpleDateFormat(PAGE_DATE_FORMAT, locale);
> > 
> > // Print created & modified info
> > out.println("Created by " + creatorName + " at " +
> > dFormat.format(createdDate) + ".");
> > out.println("Last modified by " + modifierName + " at " +
> > dFormat.format(modifiedDate) + ".");
> > %>
> > 
> > HTH.
> > 
> > Cheers,
> > Paul
> >  
> > 
> > > -----Original Message-----
> > > From: opencms-dev-bounces at opencms.org
> > 
> > > [mailto:opencms-dev-bounces at opencms.org]
> > On Behalf Of Marko Riedel
> > > Sent: 18. april 2011 16:49
> > > To: opencms-dev at opencms.org
> > > Subject: [opencms-dev] file modification time
> > > 
> > > 
> > > Hello there,
> > > 
> > > I am new to OpenCMS and I would like to know how to
> > display 
> > > the modification time of a page at the bottom of the
> > page. 
> > > E.g. if the page was last edited on the 15.4.11 then
> > that's 
> > > the date I'd like to see. I guess this requires
> > modification 
> > > of the relevant JSP template? Or can it be done with
> > JavaScript?
> > > 
> > > I'd be grateful for any pointers you may have.
> > > 
> > > Best regards,
> > > 
> > > Marko Riedel
> > > 
> > > +---------------------------------------------------+
> > > | Marko Riedel, markoriedelde at yahoo.de 
> >             |
> > > | http://www.mathematik.uni-stuttgart.de/~riedelmo/ |
> > > +---------------------------------------------------+
> > > 
> > > _______________________________________________
> > > This mail is sent to you from the opencms-dev mailing
> > list
> > > To change your list options, or to unsubscribe from
> > the list, 
> > > please visit
> > > http://lists.opencms.org/mailman/listinfo/opencms-dev
> > > 
> > 
> > _______________________________________________
> > This mail is sent to you from the opencms-dev mailing list
> > To change your list options, or to unsubscribe from the
> > list, please visit
> > http://lists.opencms.org/mailman/listinfo/opencms-dev
> > 
> 
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, 
> please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
> 


More information about the opencms-dev mailing list