You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Thorsten Scherler <th...@juntadeandalucia.es> on 2009/07/21 13:13:09 UTC

Limit usecases to specific resource types

Hi all,

I am trying to limit certain usecases to specific resource types to
enhance the user experience and reduce the complexity of my pub.

Back in the days we did that with menu.xsp, however the only module that
contains thus a page is the tinymc module. Further it is not working
there. 

For example in my current pub I only want the option "create new xhtml
doc" ONLY when I am on a page with resource type "news". This way I can
control which documents the user can create and how they will be
displayed in the pub.

What is the preferred way to implement such condition in menu?

salu2
-- 
Thorsten Scherler <thorsten.at.apache.org>
Open Source Java <consulting, training and solutions>

Sociedad Andaluza para el Desarrollo de la Sociedad 
de la Información, S.A.U. (SADESI)





---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: Limit usecases to specific resource types

Posted by Thorsten Scherler <th...@juntadeandalucia.es>.
On Tue, 2009-07-21 at 13:46 +0200, Andreas Hartmann wrote:
> Hi Thorsten,
> 
> Thorsten Scherler schrieb:
> > I am trying to limit certain usecases to specific resource types to
> > enhance the user experience and reduce the complexity of my pub.
> > 
> > Back in the days we did that with menu.xsp, however the only module that
> > contains thus a page is the tinymc module. Further it is not working
> > there. 
> > 
> > For example in my current pub I only want the option "create new xhtml
> > doc" ONLY when I am on a page with resource type "news". This way I can
> > control which documents the user can create and how they will be
> > displayed in the pub.
> > 
> > What is the preferred way to implement such condition in menu?
> 
> you can use the "resourceTypes" attribute of the <block> element:
> 
>    <block areas="authoring" resourceTypes="news">
>      <item uc:usecase="…">Create XHTML Document</item>
>    </block>
> 
> I guess we need some docs on the menubar for 2.0 …
> 
> HTH,

Cheers Andreas, that is what I tried before without success. I can still
create XHTML document in other places. Will tried again with the default
pub since I tested in my own.

Any finding I will put in the docu.

salu2
-- 
Thorsten Scherler <thorsten.at.apache.org>
Open Source Java <consulting, training and solutions>

Sociedad Andaluza para el Desarrollo de la Sociedad 
de la Información, S.A.U. (SADESI)





---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: Limit usecases to specific resource types

Posted by Andreas Hartmann <an...@apache.org>.
Hi Thorsten,

Thorsten Scherler schrieb:
> I am trying to limit certain usecases to specific resource types to
> enhance the user experience and reduce the complexity of my pub.
> 
> Back in the days we did that with menu.xsp, however the only module that
> contains thus a page is the tinymc module. Further it is not working
> there. 
> 
> For example in my current pub I only want the option "create new xhtml
> doc" ONLY when I am on a page with resource type "news". This way I can
> control which documents the user can create and how they will be
> displayed in the pub.
> 
> What is the preferred way to implement such condition in menu?

you can use the "resourceTypes" attribute of the <block> element:

   <block areas="authoring" resourceTypes="news">
     <item uc:usecase="…">Create XHTML Document</item>
   </block>

I guess we need some docs on the menubar for 2.0 …

HTH,

-- Andreas

-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org