I think this should be possible in some kind of helpers, or methods in
my controller. Or any place in *my application*, and not in the source
code of HAML.
HAML source is confusing for me, because:
1. I'm not a developer
2. I don't know, now plugins work. And how to rewrite them.
But I do know how to write simple app on RoR with models, controllers
and helpers. And HAML will win, if this kind of users can extend it
with their own syntax and methods. That's it.
On Jul 23, 6:53 am, Nathan Weizenbaum <[EMAIL PROTECTED]> wrote:
> The Haml source isn't that confusing. You should be able to add in
> something like that fairly easily.
>
> - Nathan
>
> Vlad Rafeyev wrote:
> > ok, let's not force everybody to use this strange syntax.
>
> > But what about my own strange syntax for me only? What if I set some
> > kind of prefix and define logic myself? Like in the example above.
>
> > On Jul 22, 4:59 pm, Hampton <[EMAIL PROTECTED]> wrote:
>
> >> The real problem is that partials usually have slashes in them when
> >> they aren't in the same folder, and that starts to get messy.
>
> >> _users/question_one{:var1 => "var1"}
>
> >> I mean, I do find myself doing that pattern often, but I just don't
> >> know if its *too much*. Like, too specific to what Rail's is doing and
> >> too liable to break.
>
> >> Let me think about it more.
>
> >> -hampton.
>
> >> On 7/22/07, Vlad Rafeyev <[EMAIL PROTECTED]> wrote:
>
> >>> Don't you think, that
>
> >>> - partial :question_one, { :var1 => 'var1' }
>
> >>> sounds much worse than
>
> >>> _question_one{:var1 => "var1"}
>
> >>> ?
>
> >>> Especially then we talk about Haiku :)
>
> >>> On Jul 22, 2:18 pm, Evgeny <[EMAIL PROTECTED]> wrote:
>
> >>>> I believe the answer of every guru will be - "Use a helper!"
>
> >>>> That would give you syntax that is more consistent with everything
> >>>> else haml, and will probably look something like this :
> >>>> - partial :question_one, { :var1 => 'var1' }
> >>>> Or whatever else you want it to look like.
>
> >>>> I for one would not want Haml to be too extendable, with custom tags
> >>>> for example.
>
> >>>> On 7/22/07, Vlad Rafeyev <[EMAIL PROTECTED]> wrote:
>
> >>>>> Hello, kind HAML gurus and developers!
>
> >>>>> I use this code very often:
>
> >>>>> = render :partial => "question_one", :locals => {:var1 => "var1"}
>
> >>>>> But what if I want to use my own type of HAML tags? For example like
> >>>>> this:
>
> >>>>> _question_one{:var1 => "var1"}
>
> >>>>> Is it possible to add new types of tags? If so, how?
>
> >>>>> Thank you!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Haml" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---