|
Home > Archive > Microsoft Content Management Server > August 2004 > Creating a List Custom Control
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Creating a List Custom Control
|
|
| brett b. 2004-08-18, 5:52 pm |
| Hi all, we are starting our second CMS project and one of the things
I'd like to tackle is creating a good all-purpose list control that is
flexible enough to be reused everywhere and provides styling
capabilities that won't require new code drops when the design needs
to be changed or when the org decides to use a new date format.
The list control itself really only needs to do a few things. It
should be able to look at all posts in a single channel and grab any
number of placeholder defs in the posting defined as parameters.
But what I'd really like it to do is use an external stylesheet,
possibly an XSL, applied to the result set to define what the list
should look like. It would be nice to be able to make transformations
on data like converting January to Jan. that might use some logic but
I don't want to encapsulate this in code. Hence I'm avoiding using
something like itemtemplates with the repeater.
My plan so far would be to have the control convert the returned
results to XML pass it through the XSL styleseet and then display the
results. My question is, has anyone done anything similar or seen
existing examples of this type of control? does this sound like a
good/bad approach?
Thanks much in advance!
| |
| Spencer Harbar [MVP] 2004-08-19, 5:53 pm |
| Sure. XSLT is certainly a valid approach.
For example the UKIB Navigation control works using XSLT.
Just slap a design time property on the control - the path to the XSLT. In
presentation mode rendering use this to transform the XML.
--
hth
Spence
www.mcmsfaq.com
"brett b." <host@liquidmix.com> wrote in message
news:21e4159b.0408181534.1c29af02@posting.google.com...
> Hi all, we are starting our second CMS project and one of the things
> I'd like to tackle is creating a good all-purpose list control that is
> flexible enough to be reused everywhere and provides styling
> capabilities that won't require new code drops when the design needs
> to be changed or when the org decides to use a new date format.
>
> The list control itself really only needs to do a few things. It
> should be able to look at all posts in a single channel and grab any
> number of placeholder defs in the posting defined as parameters.
>
> But what I'd really like it to do is use an external stylesheet,
> possibly an XSL, applied to the result set to define what the list
> should look like. It would be nice to be able to make transformations
> on data like converting January to Jan. that might use some logic but
> I don't want to encapsulate this in code. Hence I'm avoiding using
> something like itemtemplates with the repeater.
>
> My plan so far would be to have the control convert the returned
> results to XML pass it through the XSL styleseet and then display the
> results. My question is, has anyone done anything similar or seen
> existing examples of this type of control? does this sound like a
> good/bad approach?
>
> Thanks much in advance!
|
|
|
|
|