On Tue, Mar 2, 2010 at 11:42 PM, Heiko Seeberger <
[email protected]> wrote:

> On 3 March 2010 00:03, David Pollak <[email protected]> wrote:
>
>>
>>
>> On Tue, Mar 2, 2010 at 1:05 PM, Heiko Seeberger <
>> [email protected]> wrote:
>>
>>> Hi,
>>>
>>> Isn't it possible to put snippets in subpackages of xxx.snippet?
>>> Something like <lift:snippet
>>> type="com.acme.snippet.subpackage.SnippetClass">?
>>>
>>> If not, what's the best way to deal with a large number of snippets?
>>>
>>
>> Explicitly registering the snippet dispatch in LiftRules is the way I'd
>> recommend doing it.  If this is less than 100% optimal for your use case,
>> let's learn more about your use case and see if we have to expand how
>> Snippets are looked up.
>>
>
> Well, registering quite a lot of snippets is indeed less than 100% optimal.
>
> OK, I have got a not-so-small website with about 100 templates and
> snippets. The templates are organized as a tree, e.g. /login/signup/seeker,
> /login/signup/offerer, etc. There is not a perfect 1:1 relationship between
> templates and snippets, but for sake of simplicity let's assume so. Hence I
> would like to organize my snippets in packages according to the templates,
> e.g. ...snippet.login.signup.Seeker, ...snippet.login.signup.Offerer, etc.
>

One of the things I do with page-specific snippets is call them out in
SiteMap:

Loc(..., Snippet("foo", snipetFunc))

But it might also be interesting to explore a model like Wickets:

foo/bar/page.html -> look in snippets.foo.bar in addition to the normal
snippets package... would that help?


>
> Thank you,
>
> Heiko
>
> Company: weiglewilczek.com
> Blog: heikoseeberger.name
> Follow me: twitter.com/hseeberger
> OSGi on Scala: scalamodules.org
> Lift, the simply functional web framework: liftweb.net
>
> --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<liftweb%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/liftweb?hl=en.
>



-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.

Reply via email to