Sign in

E-mail *, (xx@domain.com)
Password *

Register | Forgot password

Active forums

Active Forums RSS September 02, 17:37
Style properties

August 31, 21:46
antrun not found

August 31, 14:12
WCB customprofile

August 31, 12:10
End of flow not doing its job

August 24, 12:37
Sort mediaItem by expiration date

 All Forums...


Inzet aanroepen in een JSP (zonder deze toe te wijzen aan een pagina)

The "WCB: JSP front-end design" forum contains threads on issues that are related to JSP front-end design while programming a WCB (WebManager Component Bundle). The Presentation & Element component contain JSPs that will be used for front-end rendering. Ask your questions related to these JSPs here. Some example topics: integration of AJAX, use of the taglibs, how to handle multiple websites, and so forth.

Answered
Not marked as answered yet

Forums  >  WCB: JSP Front-end design  >  Inzet aanroepen in een JSP (zonder deze toe te wijzen aan een pagina)


Author Inzet aanroepen in een JSP (zonder deze toe te wijzen aan een pagina)
abouaabasslam


Posts: 5

Posted: 28-01-2010 14:45

Voor het gemak in het nederlands

Heeft er iemand een inzet met inhoud(paragraafElement) weten toe te kennen in een jsp zonder dat je in webmanager de inzet aan de pagina toekent?

Ik wil een volgcode aan alle pagina's toekennen waarbij de code in een inzet geplaatst wordt. Dit wil ik doen zonder de verschillende pagina's na te hoeven lopen en de inzet op de reguliere manier toe te voegen.

Ik hoop dat iemand hier een antwoord op heeft.

Vriendelijke groet,
Samad

patricka



Posts: 255

Posted: 29-01-2010 13:09

Hi Samad,

I have seen projects where special pages were used to emulate page sections. A pagepart was made that retrieved one specific special page and then render its content.

Like so:


<%-- Retrieve the special page labelled 'SpecialContent' --%>
<wm:specialPages var="specialContentPages" label="SpecialContent" />

<c:set var="specialContentPage" value="" />
<c:if test="${not empty specialContentPages}">
<c:set var="specialContentPage" value="${specialContentPages[0]}" />
</c:if>

<%-- Just render the content of that page --%>
<wm:render object="${specialContentPage.current}"
contentHolder="${specialContentPage.current}"
presentationName="WM content" />



Hope that helps!

Greetings,

Patrick

williamb



Posts: 234

Posted: 29-01-2010 20:10

I've even seen a WCB doing that... but it's not (yet) on WCMExchange I see.

Maybe MichelT can answer that one?

m.machielsen



Posts: 25

Posted: 01-02-2010 12:59

The default presentation does the following:

<c:set var="pagePart" value="${presentationcontext.pagePart}" />
<c:set var="blocks" value="${pagePart.blocks}" />

<c:forEach var="block" items="${blocks}">
<c:if test="${not empty block.current}">
<wm:render object="${block.current}" />
</c:if>
</c:forEach>



So it gets the page sections (=blocks) from the pagepart (which looks at the labels and which page sections are connected to the page). You can add a call for your specific block by looping over the blocks from the webinitiatif and filtering the one you want to show (according to a eg. block label).

michelt



Posts: 11

Posted: 04-02-2010 11:15

Hi,

I've built an element that does it for you.

http://www.wcmexchange.com/pagepartelement

Do read the readme.txt please.

Regards,

Michel

Back to top

New message: "Inzet aanroepen in een JSP (zonder deze toe te wijzen aan een pagina)"
Message:
bold boitalicd underline url quote code smile cool eek grin mad razz sad wink
 
© 2010 GX creative online development B.V.

Disclaimer

This website (GXdeveloperweb.com) may discuss or contain opinions, (sample) coding, software or other information that does not include GX official interfaces, instructions or guidelines and therefore is not supported by GX. Changes made based on this information are not supported.  GX will not be held liable for any damages caused by using or misusing the information, software, instructions, code or methods suggested on this website, and anyone using these methods does so at his/her own risk. GX offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this website, including any liability resulting from incompatibility between the content of this website and the materials and services offered by GX. By using this website you will not hold, or seek to hold, GX responsible or liable with respect to the content of this website.