Jörn Nettingsmeier schrieb:
> hi everyone!
> 
> 
> trying to nail down the asset problem (format=downloadLink breaking
> pages)...
> 
> how are resource type formats supposed to work? are they all strictly
> internal-only, or should i be able to request them via browser as well?

You can use the parameterized version to obtain it from the browser.

http://lenya.zones.apache.org/docu/docs/2_0_x/reference/resource-types.html#Formats:

There are two ways in which the format can be requested:

* for the current document - without parameters
* for a specific document - with the parameters
/{pubId}/{area}/{uuid}/{language}

But this isn't very convenient, so typically there will be a hook in
the publication sitemap.


> when i create an asset FOO.png under /index and request
> /default/authoring/index/FOO.png?format=downloadLink, i get standard
> rendering of the page, not (as i believe i should) just the xhtml
> snippet from xslt/downloadLink.xsl. same if i try format=icon or similar.

The format parameter is only evaluated for the site: and lenya-document:
protocols (see documentation), not for browser requests. Shall we change
that?


> btw, here's a suggestion (after wading through many a convoluted
> sitemap): can we please stop this nonsense of using pseudo "file names"
> like "xhtml.xml" as matcher patterns? these are totally obscure, give no
> clue what they are about and worst of all imply there's an actual file
> resource somewhere.

Hmmm, IMO it makes sense to use the suffix to denote that XML is
returned by the pipeline. But I don't mind removing it.

> how about using self-explanatory names? for instance, the resource
> module implements several formats, all named "something.xml". why not
> just match for "format-downloadLink", "format-webDAV",
> "format-whatever", where the part after the dash matches what's declared
> as format identifier in config/cocooc-xconf/module.xconf?

Makes sense.


> i'm also not sure whether we should maintain the configurable format uri
> in the xconf files. why not set up the convention that resource type
> formats are to be implemented as "format-FOO" and get rid of the
> indirection? or are there examples where the current approach is
> absolutely necessary?

What would the URL be? A module can provide multiple resource types,
and there is no convention like moduleName = resourceTypeName (yet).

-- Andreas

-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to