Re: [Radiant] r:find question

2008-12-03 Thread John W. Long

On Dec 3, 2008, at 8:56 AM, Sean Cribbs wrote:

YAY! Someone who agrees with me!

The caveat, of course, is that often you need to put Radius tags  
inside the attributes of HTML tags.  But that's because Radius is  
not strict XML, but interpolated.  When explaining Radius to a local  
web design meetup, one sorta-technical guy suggested we use an XML  
parser/XSLT and I had to tell him no.  It only looks like it could be.


To add to this, another reason to avoid it is that it requires parsing  
the template twice. Once to parse the tags out and once to parse the  
attributes.


I'm more interested in the idea of adding support for some kind of  
variable notation from within the tags. Something like Chris Parrish's  
extension, though I think the syntax could be improved.


--
John Long
http://wiseheartdesign.com
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] r:find question

2008-12-03 Thread Chris Parrish
Actually, I should probably clarify.  I agree that IF you are going to 
use an XML paradigm, better to leave it be.  That said as Radiant's been 
growing in popularity, I've been seeing more and more people hitting a 
wall here.


I'm starting to wonder whether using an XML paradigm is really best.  
After all, I wouldn't think that the target Radiant user is necessarily 
familiar with XML. (And a href=r:slug// title=r:title//Link 
Text/a isn't all that elegant or XML consistent either -- as Sean noted).


I realize that Radius' goal of maintaining simplicity is good -- I want 
elegance too -- but has anyone given any thought to these kinds of 
needs.  My vote was with the desire for consistency, but that does still 
leave the legitimate, requested need un-addressed here.



-Chris


Chris Parrish wrote:

+1


Sean Cribbs wrote:

Adam van den Hoven wrote:

EEEWWW NOO!

Please don't do this. If you are going to use an XML paradigm for 
your DSL then stick to it. There is nothing that makes my skin crawl 
more than seeing tags as attribute values.


Aside from pure aesthetics (which is considerable), there is the 
matter of tooling. I can find extensible WYSIWYG XML widgets 
(they're not as common or as cheap as I'd like) and none of them 
will never be able to handle this (IMHO, extending XML widgets may 
be better in the long term than wrapping textile or what have you). 
And and you'll never be able to debug it.


I hate that we do this now for HTML attribute values, lets not 
pollute the paradigm more. Otherwise rolling something into HAML 
would be better (I'm guessing)

YAY! Someone who agrees with me!

The caveat, of course, is that often you need to put Radius tags 
inside the attributes of HTML tags.  But that's because Radius is not 
strict XML, but interpolated.  When explaining Radius to a local web 
design meetup, one sorta-technical guy suggested we use an XML 
parser/XSLT and I had to tell him no.  It only looks like it could be.


Sean
___
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


Re: [Radiant] r:find question

2008-12-03 Thread Adam van den Hoven
I don't think that the issue at hand is the average user who is going  
to be hacking with the source code. They don't exist. You start  
hacking with source code and you need to be at a higher level of  
expertise.


JSTL and JSP EL handle this more elegantly (how much more is a matter  
of taste) where you can do (I'll freely mix radius and jstl for effect):


c:set var=myVarr:slug //c:set
a:href=${myVar}r:title //a

I'm in the process of turning all of HTML into a JSP TagLib (honest)  
so that I can do (again mixing with radius):


a title=here is my title attribute
jspx:attribute name=hrefr:slug //jspx:attribute
r:title /
/a

which will produce exactly what you expect.

It may be verbose, but I actually like the later approach better and I  
think that something like his might be valuable for radius?




On 3-Dec-08, at 6:29 AM, Chris Parrish wrote:

Actually, I should probably clarify.  I agree that IF you are going  
to use an XML paradigm, better to leave it be.  That said as  
Radiant's been growing in popularity, I've been seeing more and more  
people hitting a wall here.


I'm starting to wonder whether using an XML paradigm is really  
best.  After all, I wouldn't think that the target Radiant user is  
necessarily familiar with XML. (And a href=r:slug//  
title=r:title//Link Text/a isn't all that elegant or XML  
consistent either -- as Sean noted).


I realize that Radius' goal of maintaining simplicity is good -- I  
want elegance too -- but has anyone given any thought to these kinds  
of needs.  My vote was with the desire for consistency, but that  
does still leave the legitimate, requested need un-addressed here.



-Chris


Chris Parrish wrote:

+1


Sean Cribbs wrote:

Adam van den Hoven wrote:

EEEWWW NOO!

Please don't do this. If you are going to use an XML paradigm for  
your DSL then stick to it. There is nothing that makes my skin  
crawl more than seeing tags as attribute values.


Aside from pure aesthetics (which is considerable), there is the  
matter of tooling. I can find extensible WYSIWYG XML widgets  
(they're not as common or as cheap as I'd like) and none of them  
will never be able to handle this (IMHO, extending XML widgets  
may be better in the long term than wrapping textile or what have  
you). And and you'll never be able to debug it.


I hate that we do this now for HTML attribute values, lets not  
pollute the paradigm more. Otherwise rolling something into HAML  
would be better (I'm guessing)

YAY! Someone who agrees with me!

The caveat, of course, is that often you need to put Radius tags  
inside the attributes of HTML tags.  But that's because Radius is  
not strict XML, but interpolated.  When explaining Radius to a  
local web design meetup, one sorta-technical guy suggested we use  
an XML parser/XSLT and I had to tell him no.  It only looks like  
it could be.


Sean
___
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


Re: [Radiant] r:find question

2008-12-02 Thread Chris Parrish
Joe.  I assume that you are using Manuel Meurer's Parameterized-Snippets 
from the syntax (as opposed to my Variables extension) to do this.  
Neither of our tools (or any radius tags, for that matter) allow this 
kind of nested parsing out of the box.


I believe that Manuel modified Radius to do just what you want 
(http://github.com/manuelmeurer/radius/tree/master).  You'll have to 
install his version of Radius to somehow overwrite the built-in Radiant one.


-Chris

Joe Van Dyk wrote:

Hi,

I have a snippet that contains this code:

 r:find url=r:var name='match' /
   r:if_ancestor_or_selfcurrent/r:if_ancestor_or_self
 /r:find

r:var is an extension that lets me pass arbitrary values in to
snippets.  So, I'd be calling that snippet with something like:
  r:snippet name=snippet match=/url/of/page /

However, I think since the r:var call is in quotes, it's being passed
directly to the r:find tag method, without first being evaluated.

Is there a way to evalulate the r:var tag, and then have the result be
sent to r:find as the url argument?

Thanks,
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] r:find question

2008-12-02 Thread Joe Van Dyk
I think that's what I'm looking for.  Any chance that could be merged
into radiant core?

On Tue, Dec 2, 2008 at 3:48 PM, Chris Parrish
[EMAIL PROTECTED] wrote:
 Joe.  I assume that you are using Manuel Meurer's Parameterized-Snippets
 from the syntax (as opposed to my Variables extension) to do this.  Neither
 of our tools (or any radius tags, for that matter) allow this kind of nested
 parsing out of the box.

 I believe that Manuel modified Radius to do just what you want
 (http://github.com/manuelmeurer/radius/tree/master).  You'll have to install
 his version of Radius to somehow overwrite the built-in Radiant one.

 -Chris

 Joe Van Dyk wrote:

 Hi,

 I have a snippet that contains this code:

 r:find url=r:var name='match' /
   r:if_ancestor_or_selfcurrent/r:if_ancestor_or_self
 /r:find

 r:var is an extension that lets me pass arbitrary values in to
 snippets.  So, I'd be calling that snippet with something like:
  r:snippet name=snippet match=/url/of/page /

 However, I think since the r:var call is in quotes, it's being passed
 directly to the r:find tag method, without first being evaluated.

 Is there a way to evalulate the r:var tag, and then have the result be
 sent to r:find as the url argument?

 Thanks,
 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

___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant