[opencms-dev] FW: Display a section content with parameter

Jonathan Woods jonathan.woods at scintillance.com
Wed May 17 20:30:46 CEST 2006


1.  Let's assume that new.html is a resource of type xmlcontent, according
to some schema of your choice.  It therefore contains an XML document with
addressable elements.
 
2.  Set the property 'template-elements' of new.html to be
/the/full/VFS/path/to/myTemplate.jsp     .  OpenCms will therefore execute
that JSP file whenever it is asked for new.html.
 
3.  In file myTemplate.jsp, you can write any JSP/Java code you like,
including code which pulls values out of the elements inside the XML
document in new.html.  To do that, you can use JSP code like
 
        <cms:contentload collector="singleFile" param="${opencms.uri}"
editable="true">
 
then
 
        <h2><cms:contentshow element="HeadlineStoryTitle" /></h2>
 
to do that.
 
4.  You can also read parameters on the URI requested, using the usual JSP
methods for doing so.  For example:
 
request.getParameter("sectionToShow");
 
5.  So you can therefore use URI parameters to control which pieces of
content are shown.
 
Jon
 
  _____  

From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of
Marc.Fievet at winterthur.be
Sent: 17 May 2006 13:53
To: opencms-dev at opencms.org
Subject: [opencms-dev] FW: Display a section content with parameter



 
Hello list,
 


 Manuel, Thank  for your answer but I don't think it's a solution for my
problem
.According  parameter value specifies the folder (the path), it's use for
create a list of content
My goal is  quite different: create a  unique file new.html  (type news)
and display some specifics part in the file, like  the title , the teaser or
other parts by using a argument or a string un the url
 
I don't know if it's possible?
Than you.
 
Regards 



Hi Marc,

 

 

You can access every defined section seperatly.

 

Use something like this:

 

 

<cms:contentload collector="allInFolderDateReleasedDesc"
param="/sites/newsItems/news_${number}.html|news" editable="true">

 

With this tag you collect every news Item in the folder /sites/nesItems ...

 

<cms:contentshow element="Title"/>

<cms:contentshow element="Headline"/>

 

 

Do so,ething else ...

 

</cms:contentload>

 

 

 

And so on .....

 

 

~manuel

 

 

 


  _____  


Von: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] Im Auftrag von
Marc.Fievet at winterthur.be
Gesendet: Freitag, 12. Mai 2006 11:42
An: opencms-dev at opencms.org
Betreff: [opencms-dev] Display a section content with parameter

 

Hello,

 

I create a page by using structured content; news article.  When the page is
showing, all  the widget field are inside a single file.

 

Is-it possible to separate the different part of the widget. Example, If I
want to show the title of my news or another section (text, the links), i
put an parameter in the URL like "?show=Tittle" or somethink else.

 

Clearly, the URL to access the help would contain the parameter
corresponding to the required section Thank you,

Regards,

MARC

Marc FIEVET
BASIS IT Infrastructure - Network & Servers 
Tél. : +32 2 519 16 59
Fax : +32 2 519 64 08
E-Mail : marc.fievet at winterthur.be

Winterthur-Europe Assurances
56,  avenue des Arts
B-1000 Bruxelles
 <http://www.winterthur.be/> www.winterthur.be



 

______________________________________________


Winterthur-Europe Insurance - VAT BE 0403.290.168 RPM/RPR BRUSSELS.
This message may contain confidential, proprietary or legally privileged
information and is intended only for the use of the addressee named above.
No confidentiality or privilege is waived or lost by any mistransmission. If
you are not the intended recipient of this message you are hereby notified
that you must not use, disseminate, copy it in any form or take any action
in reliance on it. If you have received this message in error please delete
it and any copies of it and notify Winterthur immediately.This e-mail
message and any attached files have been scanned for the presence of
computer viruses. However, you are advised that you open any attachments at
your own risk. 
The integrity and security of this message cannot be guaranteed on the
Internet.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20060517/ad23dea6/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 2788 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20060517/ad23dea6/attachment.gif>


More information about the opencms-dev mailing list