Sounds like this is a discussion for another list ;) ... I cede. Cheers, Jay Moskos
-----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] Sent: Friday, February 03, 2006 1:27 PM To: [email protected] Subject: Re: [magnolia-user] getting content of nodes It is not that a web designer would be 'messing with the code'. The idea is that if you use tags rather than scriptlets, the flow is easier and more intuitive for a non-programmer to work with. This is important as that person is responsible for the look and feel of the content. They need to be able to easily arrange elements (from a presentation standpoint) and appropriately apply styles to them using a combination of CSS and HTML <div> tags. Additionally, modern Web design tools like Dreamweaver handle tags better than scriptlet blocks. -KG -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] Sent: Friday, February 03, 2006 10:58 AM To: [email protected] Subject: Re: [magnolia-user] getting content of nodes Forking the code doesn't make sense to me in this case. Why use a tag and a scriptlet when one scriptlet will suffice (especially when the end goal is to use the variable in the scriptlet)? I'm also doubtful that "<c:set var="filename"><cms:out nodeDataName="filename" /></c:set>" is going to be any more intuitive to a "web designer" than using java in the scriptlet. The web designer shouldn't even be messing with the code if he doesn't know what he's doing. Cheers, Jay Moskos -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] Sent: Friday, February 03, 2006 10:46 AM To: [email protected] Subject: Re: [magnolia-user] getting content of nodes All things being equal, the 'preferred' solution is always the one that uses tags rather than scriptlets. It is cleaner and easier to understand and maintain. Additionally, a web designer (non-Java developer) can more easily work with the content and not have to worry about the Java code. -KG -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] Sent: Friday, February 03, 2006 10:21 AM To: [email protected] Subject: Re: [magnolia-user] getting content of nodes all, Recently I had the same problem and used the code below to use values in scriplets. <c:set var="filename"><cms:out nodeDataName="filename" /></c:set> <% String filename = (String) pageContext.getAttribute("filename"); %> They both do their job, but what is the preferred way of accessing variables ? cheerio, Vincent -----Original Message----- From: Moskos, Jay [mailto:[EMAIL PROTECTED] Sent: vrijdag 3 februari 2006 17:14 To: [email protected] Subject: Re: [magnolia-user] getting content of nodes Try String phone = ((Resource.getLocalContentNode(request)).getNodeData("phone")).getString (); Cheers, Jay Moskos -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] Sent: Friday, February 03, 2006 10:07 AM To: [email protected] Subject: [magnolia-user] getting content of nodes hi, i think i've got a little missunderstandig: <cms:out nodeDataName="Phone" /> prints the content of Phone. so far so good. but how i can access the same content in a scriplet? i try the code below, but it doesn't work. why? Content currentPage = Resource.getActivePage(request); String email = currentPage.getNodeData("Phone").getString(); thx for help so long ingo ---------------------------------------------------------------- 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 ---------------------------------------------------------------- ---------------------------------------------------------------- for list details see http://www.magnolia.info/en/magnolia/developer.html ----------------------------------------------------------------
