Re: [Radiant] Using textile inside of snippets
On Thu, Oct 30, 2008 at 5:12 PM, Joe Van Dyk [EMAIL PROTECTED] wrote: On Thu, Oct 30, 2008 at 5:07 PM, Joe Van Dyk [EMAIL PROTECTED] wrote: On Thu, Oct 30, 2008 at 4:41 PM, Tim Gossett [EMAIL PROTECTED] wrote: On Thu, Oct 30, 2008 at 6:09 PM, Joe Van Dyk [EMAIL PROTECTED] wrote: Given the following snippet (using the textile filter): div class='section' div class='section-content' r:yield / /div /div When I try to use the snippet like so (inside a page part that uses textile): r:snippet name=subsection title=More about PSRC # first # second /r:snippet The list doesn't get formatted as textile -- I see # first # second on the page instead of the expected html numbered list. Any ideas? Whitespace matters to Textile. Try this: r:snippet name=subsection title=More about PSRC # first # second /r:snippet Didn't seem to work. Ok, this is odd. If the snippet internal is like this, the first ordered list works, and the last one doesn't. # link one # line two * line one If the snippet internal is like this, the first two lists work, and the last one doesn't. # link one # line two * line one # link three # link four Not sure what's going on. This works: r:snippet name=stuff * list one * list two nbsp; /r:snippet So, if there's anything after the list, then the list will render correctly. ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
[Radiant] Using textile inside of snippets
Given the following snippet (using the textile filter): div class='section' div class='section-content' r:yield / /div /div When I try to use the snippet like so (inside a page part that uses textile): r:snippet name=subsection title=More about PSRC # first # second /r:snippet The list doesn't get formatted as textile -- I see # first # second on the page instead of the expected html numbered list. Any ideas? Joe ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Using textile inside of snippets
Joe, Interesting... I think that could be a bug in the implementation of the r:snippet and r:yield tags. I'm not sure how this should be addressed. A snippet could be called from a page part, layout, or from another snippet, each of which could be using a different filter. I suppose that the most natural thing would be to use the same filter for the content inside the snippet tags as is being used in the context from which the snippet is called. The idea for yielding snippets started life in my Wrappits extension[1], and was rolled into the Radiant core in version 0.6.8. You could try installing the wrappits extension. The behaviour of r:snippet and r:yield defined in the extension should override the behaviour defined in Radiant core. So you could experiment with modifying those tags, without having to meddle with the code of Radiant. I'll add this to my list, and try to address it when I get a chance. In the meantime, I suggest that you resort to plain HTML for the content between r:snippet/r:snippet tags, e.g.: r:snippet name=subsection title=More about PSRC ol lifirst/li lisecond/li /ol /r:snippet Cheers, Drew [1]: http://github.com/nelstrom/radiant-wrappits-extension/tree On 30 Oct 2008, at 22:09, Joe Van Dyk wrote: Given the following snippet (using the textile filter): div class='section' div class='section-content' r:yield / /div /div When I try to use the snippet like so (inside a page part that uses textile): r:snippet name=subsection title=More about PSRC # first # second /r:snippet The list doesn't get formatted as textile -- I see # first # second on the page instead of the expected html numbered list. Any ideas? Joe ___ 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
Re: [Radiant] Using textile inside of snippets
On Thu, Oct 30, 2008 at 6:09 PM, Joe Van Dyk [EMAIL PROTECTED] wrote: Given the following snippet (using the textile filter): div class='section' div class='section-content' r:yield / /div /div When I try to use the snippet like so (inside a page part that uses textile): r:snippet name=subsection title=More about PSRC # first # second /r:snippet The list doesn't get formatted as textile -- I see # first # second on the page instead of the expected html numbered list. Any ideas? Whitespace matters to Textile. Try this: r:snippet name=subsection title=More about PSRC # first # second /r:snippet -- Tim ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Using textile inside of snippets
On Thu, Oct 30, 2008 at 4:41 PM, Tim Gossett [EMAIL PROTECTED] wrote: On Thu, Oct 30, 2008 at 6:09 PM, Joe Van Dyk [EMAIL PROTECTED] wrote: Given the following snippet (using the textile filter): div class='section' div class='section-content' r:yield / /div /div When I try to use the snippet like so (inside a page part that uses textile): r:snippet name=subsection title=More about PSRC # first # second /r:snippet The list doesn't get formatted as textile -- I see # first # second on the page instead of the expected html numbered list. Any ideas? Whitespace matters to Textile. Try this: r:snippet name=subsection title=More about PSRC # first # second /r:snippet Didn't seem to work. Joe ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Using textile inside of snippets
On Thu, Oct 30, 2008 at 5:07 PM, Joe Van Dyk [EMAIL PROTECTED] wrote: On Thu, Oct 30, 2008 at 4:41 PM, Tim Gossett [EMAIL PROTECTED] wrote: On Thu, Oct 30, 2008 at 6:09 PM, Joe Van Dyk [EMAIL PROTECTED] wrote: Given the following snippet (using the textile filter): div class='section' div class='section-content' r:yield / /div /div When I try to use the snippet like so (inside a page part that uses textile): r:snippet name=subsection title=More about PSRC # first # second /r:snippet The list doesn't get formatted as textile -- I see # first # second on the page instead of the expected html numbered list. Any ideas? Whitespace matters to Textile. Try this: r:snippet name=subsection title=More about PSRC # first # second /r:snippet Didn't seem to work. Ok, this is odd. If the snippet internal is like this, the first ordered list works, and the last one doesn't. # link one # line two * line one If the snippet internal is like this, the first two lists work, and the last one doesn't. # link one # line two * line one # link three # link four Not sure what's going on. ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant