skip an entry from data sources
This is an open discussion with 3 replies, filed under XSLT.
Search
I think the second will be your best bet. You can do the following:
<xsl:template match="your-section/entry[1]"> Your 'last case' template </xsl:template>
and
<xsl:template match="your-section/entry[position() > 1]"> Your 'other 4 cases' template </xsl:template>
Addendum. If you’re not clear on how to apply those templates in separate places, you could do it like so:
<div id="my-featured-case"> <xsl:apply-templates select="your-section/entry[1]"/> </div> <div id="recent-cases"> <xsl:apply-templates select="your-section/entry[position() > 1]"/> </div>
oh, thanks craig! i got it from the first post, thanks for the extra example too!!!
Create an account or sign in to comment.
i’m working on a design portfolio website.
on homepage i want to see a very big “last case” and under it another 4 more but in a smaller way…
i don’t know how can i do that, but i have 2 ideeas.
first: make 2 data sources, - one that feeds the first big case (already done that and is woking…) - and another one that feeds the next 4 small teasers… here i don’t know how can i make the data source to skip the first case
second: make 1 data source that exports 5 entries and somehow to use a different template for the first case.
any suggestion is priceless!