Dear Wiki user, You have subscribed to a wiki page or wiki category on "Lenya Wiki" for change notification.
The following page has been changed by JörnNettingsmeier: http://wiki.apache.org/lenya/RandomThingsLearnedWhilePlayingWith2%2e0HEAD The comment on the change is: the information in this page is now obsolete. ------------------------------------------------------------------------------ + deleted - ## page was renamed from RandomThingsLearnedWhilePlayingWith1.4HEAD - This is another brain-dump area while I'm learning my way around Lenya 2.0-HEAD. --JörnNettingsmeier - - == New Publication Wizard / Publication templating == - - Important note (quoting AndreasHartmann): - ''The default publication's instantiator [i.e. the "New publication Wizard] is just an example how it could be done, it is not thoroughly designed and tested. You can fine-tune your own instantiator just as you please.'' - - ''(see src/pubs/default/java/src/org/apache/lenya/cms/defaultpub/cms/publication/templating/Instantiator.java)'' - - - That said, the default instantiator has some issues: - - * It does not yet create a sane access control. It always uses the ac settings from the default publication (i.e. it uses the same users and groups, instead of creating its own ac). '''(CHECK: is this still the case with latest SVN?)''' - * <newpub>/config/ac/ac.xconf uses "context:///lenya/pubs/default/config/ac/passwd" etc. *But*: it always uses the "default" publication, not the actual template that is used. This can be corrected by using "fallback:///confic/ac/..." throughout /config/ac/ac.xconf. - * The contents of the passwd/ and policy/ dirs are copied into <newpub> from the default publication. - ''(Note: Changes to config/ac/ settings require lenya to be restarted in order to become active.)'' - - * It produces an incorrect setting for "templates" in config/publication.xconf. There are two template declarations instead of one, and the first is always "default". Since the first one wins, your new publication will only inherit properties from default unless you remove this line. '''(CHECK: is this still the case with latest SVN?)''' - - * It fails to initialize the search indices. See below for a manual set-up. - - == Overriding global resources == - - In order to override anything from lenya/webapp/lenya/<path>/<to>/<somefile> in your publication, you need to create a corresponding file lenya/webapp/lenya/pubs/<yourpub>/lenya/<path>/<to>/<somefile>. Note the additional "lenya" subdir, which basically says "override global stuff". - - For example, to provide your own samples when a user creates a new document, create <yourpub>/lenya/resources/samples/<resource type>.xml. - - == Initializing searching in new publications == - - As mentioned above, the default instantiator currently does not handle the creation of search indices. Whenever you use the Search form, you will get an error: - cause: org.apache.cocoon.components.search.IndexException: message: index <mypub>-<area> doesn't exist - - You need to create those indices manually. Since it is done with a cocoon xpatch file, it can only be done during deployment, i.e. you should make this modification to your external publication directory (as defined in local.build.properties), not to the live copy under "build/lenya/webapps/lenya/pubs/<yourpub>"! - - * cp -r <lenya-source-home>/src/pub/default/config/cocoon-xconf <your-external-pub-directory>/<yourpub>/config - * edit the file config/cocoon-xconf/index_manager_index.xconf, replacing all occurences of '''default''' with '''<yourpub>'''. - * ./build.sh your lenya tree. - - You should now no longer get an error when you try to use the search function. - - However, it seems that the index fails to update. I still need to figure out how to trigger the indexer after the indices are created. I have tried - http://localhost:8888/mypub/authoring/index.html?lenya.usecase=lucene.index&indexAction=index&indexArea=authoring - but that did not work. - - - == Misc == - - * Is there a fallback mechanism for the "resources" subdir? What I'd like to have is reference a .css, lenya looks in the resources dir of the current publication, and if it's not there, look in the template. Or better yet, concatenate both css files so that I can overload selected style declarations while the rest is taken from the template. - - ''Yes, there is.'' AndreasHartmann: ''"Actually that should already work (see global-sitemap.xmap): <!-- Ancestors resources, css, js, etc... --><!-- {publication-id}/{area}/{filename}.inherited.{extention} -->"'' - - * How is access control supposed to work? Ideally, users created in a template are valid for all the derived publications, and each publication also has its own local user list. Possible? - - AndreasHartmann: ''"Not yet. That would require a custom accreditable manager."'' (Cf. config/ac/ac.conf -> <accreditable-manager type="file"/>) - - * As mentioned in [http://lenya.apache.org/1_4/reference/publication-templating/index.html], templates are defined in <newpub>/config/publication.xconf. - - ''I want to be able to add new resource types to the *template* that will automatically be available in all derived publications. possible? IIUC, as it is now I have to add a new fallback entry to each derived publication's config file by hand, which is not so nice.'' - - ''Is there a way to say "take all configuration options from the template except those which are explicitly overwritten in the publication's .xconf"? This would be a lot saner IMHO.'' - - AndreasHartmann says ''"not yet"'', but welcomes patches. - --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
