You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Yura Taras <yu...@gmail.com> on 2005/12/28 12:03:12 UTC
lenyabody-view, multilingual suppot
Hi all.
I have a project written with lenya. It was my first Lenya project so
it's written really bad. But now i have to do some changes and i'm
stuck.
I've added pipeline wich match some special path, (actually
database/listing/*.html). I need this, to handle urls like
database/listing/5.html, where 5 is a number of page. I've created page
database/listing/page.html using lenya, this page will be newer viewed,
but i need it to generate menu etc.
Matcher look's like this:
<map:match pattern="**/database/listing*/*.html">
<map:aggregate element="cmsbody">
<map:part src="cocoon://navigation/{page-envelope:publication-
id}/{page-envelope:area}/breadcrumb/database/listing/pages.html.xml"/>
<map:part src="cocoon://navigation/{page-envelope:publication-
id}/{page-envelope:area}/tabs/database/listing/pages.html.xml"/>
<map:part src="cocoon://navigation/{page-envelope:publication-
id}/{page-envelope:area}/menu/database/listing/pages.html.xml"/>
<map:part src="cocoon://navigation/{page-envelope:publication-
id}/{page-envelope:area}/search/database/listing/pages.html.xml"/>
<!-- This parts return lenya navigation elements for page
database/listing/page.html, and, because i've maid page.html invisible
in navigation, it looks like it is a menu for database/listing/4.html --
>
<map:part src="cocoon:/database-listing/{3}.xml"/>
<!-- It's my xsp, that generates a set of database records -->
</map:aggregate>
<!-- Transformation and serialization -->
</map:match>
I don't think, it's good practice, but I haven't found any better
solution.
But now i have to add multilingual support. What uri i should use to
generate russian version of menu for database/listing/pages.html?
cocoon://navigation/{page-envelope:publication-id}/{page-
envelope:area}/breadcrumb/database/listing/pages_ru.html.xml doesn't
work :(
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org
Re: lenyabody-view, multilingual suppot
Posted by so...@apache.org.
On 12/28/05, Yura Taras <yu...@gmail.com> wrote:
> I've added pipeline wich match some special path, (actually
> database/listing/*.html). I need this, to handle urls like
> database/listing/5.html, where 5 is a number of page. I've created page
> database/listing/page.html using lenya, this page will be newer viewed,
> but i need it to generate menu etc.
> Matcher look's like this:
> <map:match pattern="**/database/listing*/*.html">
> <map:aggregate element="cmsbody">
> <map:part src="cocoon://navigation/{page-envelope:publication-
> id}/{page-envelope:area}/breadcrumb/database/listing/pages.html.xml"/>
> <map:part src="cocoon://navigation/{page-envelope:publication-
> id}/{page-envelope:area}/tabs/database/listing/pages.html.xml"/>
> <map:part src="cocoon://navigation/{page-envelope:publication-
> id}/{page-envelope:area}/menu/database/listing/pages.html.xml"/>
> <map:part src="cocoon://navigation/{page-envelope:publication-
> id}/{page-envelope:area}/search/database/listing/pages.html.xml"/>
> <!-- This parts return lenya navigation elements for page
> database/listing/page.html, and, because i've maid page.html invisible
> in navigation, it looks like it is a menu for database/listing/4.html --
> >
> <map:part src="cocoon:/database-listing/{3}.xml"/>
> <!-- It's my xsp, that generates a set of database records -->
> </map:aggregate>
> <!-- Transformation and serialization -->
> </map:match>
>
> I don't think, it's good practice, but I haven't found any better
> solution.
> But now i have to add multilingual support. What uri i should use to
> generate russian version of menu for database/listing/pages.html?
> cocoon://navigation/{page-envelope:publication-id}/{page-
> envelope:area}/breadcrumb/database/listing/pages_ru.html.xml doesn't
> work :(
If I understand correctly, you need to add to add the language to all
the parts so the navigation elements are generated for the correct
language:
<map:part src="cocoon://navigation/{page-envelope:publication-id}/{page-envelope:area}/menu/database/listing/pages_{page-envelope:document-language}.html.xml"/>
Then
database/listing/5_ru.html
should include the menu for the Russian documents.
solprovider
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org
Re: lenyabody-view, multilingual suppot
Posted by Michael Wechner <mi...@wyona.com>.
Yura Taras wrote:
>Hi all.
>I have a project written with lenya. It was my first Lenya project so
>it's written really bad. But now i have to do some changes and i'm
>stuck.
>I've added pipeline wich match some special path, (actually
>database/listing/*.html). I need this, to handle urls like
>database/listing/5.html, where 5 is a number of page. I've created page
>database/listing/page.html using lenya, this page will be newer viewed,
>but i need it to generate menu etc.
>Matcher look's like this:
><map:match pattern="**/database/listing*/*.html">
> <map:aggregate element="cmsbody">
> <map:part src="cocoon://navigation/{page-envelope:publication-
>id}/{page-envelope:area}/breadcrumb/database/listing/pages.html.xml"/>
> <map:part src="cocoon://navigation/{page-envelope:publication-
>id}/{page-envelope:area}/tabs/database/listing/pages.html.xml"/>
> <map:part src="cocoon://navigation/{page-envelope:publication-
>id}/{page-envelope:area}/menu/database/listing/pages.html.xml"/>
> <map:part src="cocoon://navigation/{page-envelope:publication-
>id}/{page-envelope:area}/search/database/listing/pages.html.xml"/>
> <!-- This parts return lenya navigation elements for page
>database/listing/page.html, and, because i've maid page.html invisible
>in navigation, it looks like it is a menu for database/listing/4.html --
>
>
> <map:part src="cocoon:/database-listing/{3}.xml"/>
> <!-- It's my xsp, that generates a set of database records -->
> </map:aggregate>
> <!-- Transformation and serialization -->
></map:match>
>
>I don't think, it's good practice, but I haven't found any better
>solution.
>But now i have to add multilingual support. What uri i should use to
>generate russian version of menu for database/listing/pages.html?
>cocoon://navigation/{page-envelope:publication-id}/{page-
>envelope:area}/breadcrumb/database/listing/pages_ru.html.xml doesn't
>work :(
>
>
how do you mean it doesn't work? Russian should actually
be supported for the menus:
src/webapp/lenya/resources/i18n/cmsui_ru.xml
HTH
Michi
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
>For additional commands, e-mail: user-help@lenya.apache.org
>
>
>
>
--
Michael Wechner
Wyona - Open Source Content Management - Apache Lenya
http://www.wyona.com http://lenya.apache.org
michael.wechner@wyona.com michi@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org