Channel Parameters in nested-tables.xsl
You know how you can add extra parameters to a channel in the channel creation process ? Well - that's all well and good if the channel you created cares about those (ie in the JAVA code / .car file etc).
What if you wanted to ... say - force something, like a special message, a width, assign a style class or something and access that in the XSL (nested-tables.xsl / custom.xsl).
My latest hacking expedition into Luminis 4 forced me to figure this out.
Add A Parameter
Edit a channel, go to the parameter wizard step and add a parameter named message with a value of "LumDev Inside", click Add, click Preview, Click Ok / Done.
Edit NESTED-TABLES.XSL
Now in your nested-tables.xsl - you can add this to your channel template.
<xsl:variable name='LumDevMessage'>
<xsl:choose>
<xsl:when test="parameter[@name='message']/@value">
<xsl:value-of select="parameter[@name='message']/@value" />
</xsl:when>
<xsl:otherwise>No Message</xsl:otherwise>
</xsl:choose>
</xsl:variable>
At this point you can do whatever you want with it. Render it to the screen with :
<xsl:value-of select="$LumDevMessage" />
Or send it as a parameter to render it in the channel (the actual useful bit)
To do that, add this under the call-template name="custChannel"
<xsl:with-param name="LumDevMessage" select="$LumDevMessage"/>
Edit CUSTOM.XSL
Then in custom.xsl (for your custom skin) find the custChannel template and add this parameter under the others -
<xsl:param name="LumDevMessage"/>
Now you can render it in your channel by simply enterieng {$LumDevMessage} anywhere in the channel code.
More on what you can do with this later... I have some hackin' to do.
-Jon

RE: Channel Parameters
Thanks for sharing this Jon,
We are currently looking for a method to allow users to enter more than one rss address when adding a channel type Universal Rss. We set it up so that a user can customize the address - but by default they can only enter one address. Would something like what you discuss work for adding an additional adress field or two to the Universal Rss channel type?
Thanks,
james