I'd suggest building a custom paragraph to suit your needs with
variables like padding, bgcolor, border-color, image upload location,
etc.
This should get you started:
<cms:editBar />
<div style="padding: ${padding}px; background-color:
${background-color}; border-color: ${border-color};">
<c:set var="imageURL"><cms:out nodeDataName="image" /></c:set>
<img src="${contextPath}${imageURL}" width="180" height="26" alt=""
border="0" hspace="${hspace} align="${align}"/>
<cms:out nodeDataName="text" />
</div>
Cheers,
Jay Moskos
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 07, 2005 4:35 AM
To: [email protected]
Subject: Re: [magnolia-user]
Jay,
The image table won't work in this instance as I want to include the
image inside a coloured area with text - the image tab imports the
image, but the text will be inserted on either side of the image and you
cannot get the text to be in the same formatted area.
Hard coding into the template is not an option as we want to ASP these
templates to customers to build their own websites.
So this leaves the file manager....is there any possibility to get any
hints or source on how to do this?
PP
-----Original Message-----
From: Moskos, Jay [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 7 December 2005 2:49 AM
To: [email protected]
Subject: Re: [magnolia-user]
Ah ok, you're putting that in a paragraph. I overlooked that the first
time.
Your best (read as quickest) bet is to use the Image tab (see
magnolia-product-info.html) and upload the image not into the docroot
but into each page.
The alternative if you wanted to reuse the image on lots of pages would
be to hardcode it into the template allowing you to use ${contextPath}
or to build a file manager that would attach files to a content node
(one of the guys at work did this ... took him about two weeks).
Cheers,
Jay Moskos
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 06, 2005 4:41 AM
To: [email protected]
Subject: Re: [magnolia-user]
Thanks for the reply Jay but, unfortunately this is what I have tried
already and the results is that when I press the save button in the
paragraph's edit dialogue
1.the resultant HTML becomes:
<scriptlet></scriptlet>
<div class="caseStudy"> <h1>Case Study</h1> <img title="Case Study: Jet
Apprenticeships & Traineeships" alt="Case Study: Jet Apprenticeships
& Traineeships"
src="${contextPath}/docroot/quickstart/imgs/cs_jet_home.jpg"/>
And the stack trace in the tomcat console is:
INFO info.magnolia.module.admininterface.DialogMVCServlet
DialogMVCServlet.jav
a(getHandler:72) 06.12.2005 21:27:29 can't find handler will try to
load direct ly from the config
info.magnolia.module.admininterface.InvalidDialogHandlerException: No
dialog han dler for
[${contextPath}/docroot/quickstart/imgs/cs_jet_home.jpg] found
at
info.magnolia.module.admininterface.Store.getDialogHandler(Store.java
:69)
at
info.magnolia.module.admininterface.DialogMVCServlet.getHandler(Dialo
gMVCServlet.java:69)
at
info.magnolia.cms.servlets.MVCServlet.doGet(MVCServlet.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:157)
at
info.magnolia.cms.filters.SecurityFilter.doFilter(SecurityFilter.java
:73)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:186)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:157)
at
info.magnolia.cms.filters.MultipartRequestFilter.doFilter(MultipartRe
questFilter.java:80)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:186)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:157)
at
info.magnolia.cms.filters.ContentTypeFilter.doFilter(ContentTypeFilte
r.java:65)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:186)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:157)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:214)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(Standard
ContextValve.java:198)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:152)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:137)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:118)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:102)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:16
0)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:799)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ssConnection(Http11Protocol.java:705)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:577)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:683)
at java.lang.Thread.run(Thread.java:534)
ERROR info.magnolia.module.admininterface.dialogs.ConfiguredDialog
ConfiguredDi
alog.java(getConfigNode:67) 06.12.2005 21:27:29 no config node found
for the di alog ${contextPath}/docroot/quickstart/imgs/cs_jet_home.jpg
javax.jcr.PathNotFoundException:
${contextPath}/docroot/quickstart/imgs/cs_jet_h
ome.jpg
at
org.apache.jackrabbit.core.NodeImpl.getNode(NodeImpl.java:2231)
at info.magnolia.cms.core.Content.<init>(Content.java:110)
at
info.magnolia.cms.core.HierarchyManager.getContent(HierarchyManager.j
ava:258)
at
info.magnolia.module.admininterface.dialogs.ConfiguredDialog.getConfi
gNode(ConfiguredDialog.java:64)
at
info.magnolia.module.admininterface.DialogMVCServlet.getHandler(Dialo
gMVCServlet.java:73)
at
info.magnolia.cms.servlets.MVCServlet.doGet(MVCServlet.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:157)
at
info.magnolia.cms.filters.SecurityFilter.doFilter(SecurityFilter.java
:73)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:186)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:157)
at
info.magnolia.cms.filters.MultipartRequestFilter.doFilter(MultipartRe
questFilter.java:80)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:186)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:157)
at
info.magnolia.cms.filters.ContentTypeFilter.doFilter(ContentTypeFilte
r.java:65)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:186)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:157)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:214)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(Standard
ContextValve.java:198)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:152)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:137)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:118)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:102)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:16
0)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:799)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ssConnection(Http11Protocol.java:705)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:577)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:683)
at java.lang.Thread.run(Thread.java:534)
ERROR info.magnolia.module.admininterface.DialogMVCServlet
DialogMVCServlet.jav
a(getHandler:79) 06.12.2005 21:27:29 no config node found for dialog :
${contex tPath}/docroot/quickstart/imgs/cs_jet_home.jpg
ERROR info.magnolia.module.admininterface.DialogMVCServlet
DialogMVCServlet.jav
a(getHandler:85) 06.12.2005 21:27:29 no dialog found:
${contextPath}/docroot/qu ickstart/imgs/cs_jet_home.jpg ERROR
info.magnolia.cms.servlets.MVCServlet MVCServlet.java(doGet:97)
06.12.200 5 21:27:29 no handler found
INFO info.magnolia.cms.beans.config.MIMEMapping
MIMEMapping.java(getMIMEType:1
63) 06.12.2005 21:29:44 Cannot find MIME type for extension "htc"
INFO info.magnolia.cms.beans.config.MIMEMapping
MIMEMapping.java(getMIMEType:1
63) 06.12.2005 21:29:44 Cannot find MIME type for extension "htc"
Notice the root error being that I can't run the java scriptlet and
can't get values for any of the repostory values or any java object.
I guess the question is what do I have to do the the magnolia paragraph
or dialogue to get access to these values just like in the templates?
PP
-----Original Message-----
From: Moskos, Jay [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 6 December 2005 2:55 AM
To: [email protected]
Subject: Re: [magnolia-user]
Not 100% sure I'm answering what you're asking:
<jsp:scriptlet><![CDATA[
String contextPath = request.getContextPath();
pageContext.setAttribute("contextPath", contextPath);
]]></jsp:scriptlet>
<img title="Case Study: Jet Apprenticeships & Traineeships"
alt="Case
Study: Jet Apprenticeships & Traineeships"
src="${contextPath}/docroot/quickstart/imgs/cs_jet_home.jpg"/>
Cheers,
Jay Moskos
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 03, 2005 6:12 AM
To: [email protected]
Subject: [magnolia-user]
I want to be able to reference an image installed in the tomcat server
public instance by using a relative URL.
My problem is that the code snippet is being installed into a paragraph
via a standard text/image dialog that is part of the samples shipped
with Magnolia.
How do I get the current page's context via this code snippet so that I
can then create the relative reference, if I can't reference the page
properties from within the code snippet inserted in the paragraph?
I'm using Magnolia 2.1.3.
Here is the code I want to insert into the paragraph:
<div class="caseStudy">
<h1>Case Study</h1>
<img title="Case Study: Jet Apprenticeships & Traineeships"
alt="Case
Study: Jet Apprenticeships & Traineeships" src="<relative url goes
here>/docroot/quickstart/imgs/cs_jet_home.jpg"/>
<h2><a href="browse~casestudy.html">Jet Apprenticeships &
Traineeships</a></h2> Australia's No.1 Search Engine for Apprenticeships
& Traineeships<br/> <br/> </div>
The caseStudy CSS class wraps the image in a coloured box, so I just
can't use the normal image load associated with the text/image dialog.
Cheers,
Paul Pogonoski
IMPORTANT NOTICE: This e-mail and any attachment to it is intended only
to be read or used by the named addressee. It is confidential and may
contain legally privileged information. No confidentiality or privilege
is waived or lost by any mistaken transmission to you. If you receive
this e-mail in error, please immediately delete it from your system and
notify the sender.
You must not disclose, copy or use any part of this e-mail if you are
not the intended recipient. Japara Solutions is not responsible for any
unauthorised alterations to this e-mail or attachment to it.
************************************************************************
****
************************************************************************
****
************************************************************************
****
**
CAUTION: Electronic mail sent through the Internet is not secure and
could be intercepted by a third party.
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they are
addressed.
If you have received this email in error please notify your systems
administrator.
----------------------------------------------------------------
for list details see http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------
----------------------------------------------------------------
for list details see http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------
----------------------------------------------------------------
for list details see http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------
----------------------------------------------------------------
for list details see http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------
----------------------------------------------------------------
for list details see http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------