On Wed, Jun 9, 2010 at 12:13 PM, Federico Paparoni < [email protected]> wrote:
> 2010/6/9 Justin Edelson <[email protected]> > > > On Wed, Jun 9, 2010 at 9:26 AM, Federico Paparoni < > > [email protected]> wrote: > > > > > Hi Bertrand, > > > > > > 2010/6/9 Bertrand Delacretaz <[email protected]> > > > > > > > > Not sure what you mean by "defined in a JSON file", can you point me > > > > to that file so that I can understand? > > > > > > > > > > > > > > > > > http://code.google.com/p/davidgsoc2010/source/browse/trunk/src/main/resources/initial-content/content/david.json > > > > > > The file that creates the node under /content/david. > > > > > > > > > > > > > > To help you we need a more precise description here: what's the > > > > sling:resourceType of the node that you're trying to view, and what's > > > > the exact error that you get. Basically: what's the exact simplest > > > > possible scenario that allows us to reproduce the problem. > > > > > > > > > > > The nodes are created using the sling:resourceType = david/view. I put > a > > > script named view.esp under /apps/david and when I call the url > > > http://localhost:8080/content/david/example.view< > > > http://localhost:8080/content/david/prova_.view> > > > (example > > > is the node with sling:resourceType = david/view) there is this > response > > > > > Just my 2 cents, but I find "david/view" to be a less-than-ideal resource > > type name. My preference is to use nouns for resource types and verbs for > > selectors. "view" (in English) is both a noun and a verb, but the noun > form > > (i.e. Model-View-Controller) is not that relevant in the context of > > content, > > so it would be better used as a verb. > > > > (note - I hope this makes some sense to the non-native English speakers > > among us) > > > > So I would suggest using david/page or david/article as the resource > type. > > > > Doing this makes the issue more obvious. To handle an URL like > > http://localhost:8080/content/david/example.view where > > /content/david/example has a resource type of david/page, you need a > script > > called /apps/david/page/view.esp > > > > > Hi David, > I thought David was what you are building :) > > thanks I understand what is the problem. I thought that the resourceType > means the exact script while it points to the folder where scripts are. > For the naming of the scripts, I think that page/article/somethingelse > should be better. I will fix them in the patch. > Thanks for the suggestions > Take a look at http://sling.apache.org/site/url-decomposition.html and http://dev.day.com/content/ddc/blog/2008/07/cheatsheet/_jcr_content/images/cheatsheet/front.png I think those explain how resource types fit into the URL mapping. But if there's room for improvement, please let us know. Justin > > -- > Federico >
