Loren,

It sounds like you need page parts, but if I'm understanding you correctly, you need at least one snippet so it can be evaluated in the template or in multiple pages.  A page part would contain the summary, which would be accessed and formatted by the snippet.

Sean

Loren Johnson wrote:

Sean and Mislav thanks for the responses --

For what it's worth, below is the use case for dynamic attributes in Snippets.  There are things that I'd like to see added to a Radiant release more and before than this without question (page reordering and reparenting please), but at least here is a use case for the record of what I think could be an easy, useful and possibly in-scope extension to Snippets.

An Article Summary Template

I work with a designer for most everything I do. His HTML/CSS skills are poor. We are just finishing-up a site (http://diopa.grimedesign.com) and in that site on several pages we pull-in the summary part of an article and attached a nice little header which spits out the name of the Section and the date the Article was posted before the title. This summary pattern repeats many times and is always the same except that we like to customized the link text which goes to the full article. Everything else is dynamic.

So I say to Paul, no problem I'll just through that little set of tags into a snippet such that he can do a

<r:find url="">
 <r:snippet name="summary" linkText="Read more about this on ECS News" /> 
</r:find>

This means that he doesn't have to copy and paste a format for this summary over and over as he populates the site with content. It also of course means we don't have to change it in all those spots if we want to change something global outside the scope of the CSS in this summary format.

We had considered using another page part called "linkText' to accomplish the same end, however we have situations where the same article is posted in multiple places on the site in different contexts and the link text changes accordingly.

Without any of these options working we're left with the acceptable, though less than preferable solution of:

<r:find url="" >
<div class="articleSummary">
    <r:snippet name="ArticleSummary" />
    <r:link class="more">Read more about this on ECS News...</r:link>
</div>
</r:find>

Cheers,

Loren Johnson




_______________________________________________ Radiant mailing list Post: [email protected] Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant



_______________________________________________
Radiant mailing list
Post:   [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to