Are we talking about accessing individual paragraphs contained in the page?
Like: http://fn0161.nemours.org/magnoliaPublic/www/page1/0/
I am not sure if this will work but the filter can test if the current active
page is node of type "mgnl:content". (getNodeTypeName)
>From what I could gather from the API (and I may be wrong) this is the node
>type of the that "whole" pages have.
// using StringUtils, syntaxt may be wrong...
//
String url;
// handle pages with parameters...
If (node.getHandle().indexOf("?") == -1) {
url = node.getHandle();
} else {
url = node.getHandle().substringBefore("?");
}
// test for correct url
if (node.getNodeTypeName().equals("mgnl:content") &&
!url.endsWith(Server.getDefaultExtension())) {
//set error code 404
}
Thanks
Amir
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 30, 2007 1:51 PM
> To: [email protected]
> Subject: Re: [magnolia-dev] extension on pages
>
> Then how would you suggest to (re)implement the
> selector/subtemplates features ?
>
>
> On May 30, 2007, at 19:25 , Amir Mistric wrote:
>
> > Hi
> >
> > I am not sure if this is a bug or not, but in Magnolia accessing a
> > page that does NOT have a default extension still
> works...This should
> > not be so, and error 404 should be raised.
> >
> > For, example:
> >
> > Server Default Extension: html
> >
> > http://fn0161.nemours.org/magnoliaPublic/www/page1.html
> (proper url)
> >
> > However, all of the following will also work and they should be
> > raising 404...
> >
> > http://fn0161.nemours.org/magnoliaPublic/www/page1.htm
> > http://fn0161.nemours.org/magnoliaPublic/www/page1.amir
> > http://fn0161.nemours.org/magnoliaPublic/www/
> > page1.whateverIfeellikeputtinghere
> >
> >
> > Thoughts?
> >
> > Amir
> >
> > ----------------------------------------------------------------
> > for list details see
> > http://www.magnolia.info/en/developer.html
> > ----------------------------------------------------------------
>
>
> ----------------------------------------------------------------
> for list details see
> http://www.magnolia.info/en/developer.html
> ----------------------------------------------------------------
>
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/developer.html
----------------------------------------------------------------