[Radiant] Dynamic Attributes in a Snippet Tag?

Loren Johnson loren at fn-group.com
Fri Oct 27 20:44:03 CDT 2006


We do currently use a Summary page part and a ArticleSummary snippet.  
In the following scenario it allows us to flow-in article summaries  
with 3 lines of markup instead of 6. Big deal... but it would allow  
us to build-up a CMS vocabulary and more viably bring a client  
directly into the content management themselves. I do understand that  
this sort of simplified Content Management workflow stuff begins to  
fall out of the scope of Radiant as so far articulated.

I digress.

Loren


On Oct 27, 2006, at 6:26 PM, Sean Cribbs wrote:

> 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="/news/ecs/article">
>>  <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="/news/ecs/article/" >
>> <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
>> loren at fn-group.com
>>
>>
>>
>> _______________________________________________
>> Radiant mailing list
>> Post:   Radiant at lists.radiantcms.org
>> Search: http://radiantcms.org/mailing-list/search/
>> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>
> _______________________________________________
> Radiant mailing list
> Post:   Radiant at lists.radiantcms.org
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Loren Johnson
loren at fn-group.com



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.radiantcms.org/pipermail/radiant/attachments/20061027/0ae0b14c/attachment.html


More information about the Radiant mailing list