inner text on partial views

1 view
Skip to first unread message

Torkel Ödegaard

unread,
Aug 8, 2008, 6:46:41 AM8/8/08
to spar...@googlegroups.com
Would it be possible to send the inner text to a partial?

For example lets say we have a partial named _text.spark

<text key="my_text_key">
some inner text to send to the partial view,
in this case the default text for this text key.
</text>

If would be nice to have the inner text be available in the partial as
a locally scoped variable (for example innerText).

Then the _text.spark partial could look like this:

<viewdata translationLookup="TextTranslationLookup" />

<span>
${translationLookup.Find(key, innerText)}
</span>

This is just a simple example, I think this could be useful in some cases.

Louis DeJardin

unread,
Aug 8, 2008, 2:49:46 PM8/8/08
to spar...@googlegroups.com
That's a really interesting idea. I wonder how hard it would be to have the inner content sent forward into the partial as code. It could make a partial act a bit more like monorail view components that use render section.

Although in your case it sounds like a string would be more convenient.
Reply all
Reply to author
Forward
0 new messages