Snippets can accept blocks:
<r:snippet name="post">
<!-- put some content here -->
</r:snippet>
Then in your snippet, put <r:yield /> where you want the contained
content to appear.
Sean
Steven Southard wrote:
I almost used a snippet but the problem is for my design I would need
an opening and closing snippet and then it would be hard to workout
because I'm also using an extended page part. Even if I could work it
out those snippets would have to go on every page which would be more
to ask of my client. Overall, I think I overuse snippets and underuse
layouts anyway. For achieving super-clean pages, I think, layouts are
way better and easier to use. Thanks for the idea and also for making
this extension that makes using radiant as a blog really possible.
Steven
On Jan 30, 2009, at 11:46 AM, Sean Cribbs wrote:
What I like to do is write a snippet for this use-case that I can
reuse wherever appropriate. Then my articles look the same on all
listing pages.
Sean
Steven Southard wrote:
Seems like the best way to deal with this is to make another layout
for articles. Again, Radiant's flexibility makes exactly what I saw
possible. This solution is just perfect because comments and a
slightly different layout is needed for the full article anyway.
Steven
On Jan 30, 2009, at 12:02 AM, Steven Southard wrote:
I using the archive extension and on the homepage I'm doing
something like:
<r:find url="/articles/">
<r:children:each limit="5" order="desc">
<br />
<div class="date"><r:date format="%a, %b %d, %Y" for="published_at"
/></div>
<div class="entry">
<h1><r:link /></h1>
<hr class="soft" />
<div class="entrybody">
<r:content />
<r:if_content part="extended"><r:link anchor="extended"><img
src="/images/arrow.gif" alt="arrow" /> Continue to
Story</r:link></r:if_content>
<span class="commementnumber"><r:comments:count /></span>
Comments so far
</div>
</div>
<hr />
</r:children:each>
</r:find>
Which looks really good on my homepage but then when I click the
link I loose the date, title and any of my divs so the style is all
wrong. I want the style to pretty much match the home page so how
can I go about setting up the link. I'd prefer not to add my style
to the actual article to keep it simple and clean. How do you
setup the linked page to match the homepage?
Steven
_______________________________________________
Radiant mailing list
Post: Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant
_______________________________________________
Radiant mailing list
Post: Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant
_______________________________________________
Radiant mailing list
Post: Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant
_______________________________________________
Radiant mailing list
Post: Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant
_______________________________________________
Radiant mailing list
Post: Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant