Am Jul 19, 2007 um 17:44 schrieb Andreas Hartmann:

Jürgen Ragaller schrieb:
Hi


Markus and me are trying to provide xhtml samples for our publication.
When we use the cocoo.xconf mechanism for the samples, the samples
appear - but they also appear in the default publication (and in all
other publication's xhtml create screens). This can make sense for
generic xhtml samples (not our usecase).

One option (our favorite) would be to override the section of
modules-core/sitemanagement/usecases/site/createFiels.jx where the
samples are listed. It would be nice to only override the section where the samples are listed. Would it be possible / and would it make sense, to cut out only the sample loop-section (204-220 or so) and make another
fallback enabled jx:import for the snippet?

If more than one sample is present in the default pub, the canoo tests
fail.

Maybe there is another option to do this, we am not aware of?

How about this approach:

In the resource type configuration, instead of listing the samples,
a file containing the sample declarations is referenced:

  <component-instance name="xhtml" ...>
    ...
<samples uri="fallback://lenya/modules/xhtml/samples/ samples.xml"/>
    ...
  </component-instance>

The samples.xml would look like this:

  <samples>
    <sample name="Default Sample" mime-type="application/xhtml+xml"
      uri="fallback://lenya/modules/xhtml/samples/xhtml.xml"/>
    ...
  </samples>

Then you can override the samples.xml file in your publication
and declare your own custom samples:

  pubs/yourpub/lenya/modules/xhtml/samples/samples.xml

  <samples>
    <sample name="2 Columns" mime-type="application/xhtml+xml"
      uri="fallback://lenya/modules/xhtml/samples/2columns.xml"/>
    ...
  </samples>

If somebody wants to add custom samples and still support the
default samples, they can just use aggregate-fallback:

  <component-instance name="xhtml" ...>
    ...
    <samples
uri="aggregate-fallback://lenya/modules/xhtml/samples/samples.xml"/>
    ...
  </component-instance>


IMO this would be a very clean approach. Maybe we could make the
<samples> element optional and still support the <sample-names>
elements if someone doesn't need this flexibility.

WDYT?


This would be very nice - and seems to me also much cleaner than my idea.


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

Reply via email to