Re: [Radiant] Caching of CSS files

2006-08-22 Thread Jay Levitt
Nathan Donaldson wrote: > Hi all, > > I have been looking at my logs as I am testing radiant and have noticed > that the CSS files seem to take longer to generate than the HTML files. > Am I doing something wrong? Do you have a filter defined on the CSS page? Maybe Textile is spending lots of

Re: [Radiant] Parent tag?

2006-08-06 Thread Jay Levitt
John W. Long wrote: > Andrew Hodgkinson wrote: >> It needs this tweak: >> >> define_tag 'parent' do |tag| >> tag.locals.page = page.parent || page >> tag.expand >> end >> >> Note the "|| page" on the second line. > > Instead of taking the approach above, let's do this: > >define_t

Re: [Radiant] Stylesheets

2006-08-03 Thread Jay Levitt
;s rendering it. It all happens on the client side. Have you tried taking that static HTML page and putting it in a single Radiant page - no filter, no behavior, no snippets or layout - and seeing how it renders? Jay Levitt > Here is part of my layout:- > > > &

Re: [Radiant] Proposal: Exception handling in container classes

2006-07-31 Thread Jay Levitt
Jay Levitt wrote: > I imagine if I understood continuations better, I'd know how to code > this; the inner tag should raise an exception, and the outer tag should > note that, continue its processing, and then, at the end, reraise or > render. Sadly, I'm too new to Ru

Re: [Radiant] Proposal: Exception handling in container classes

2006-07-31 Thread Jay Levitt
John W. Long wrote: > Jay Levitt wrote: >> Jay Levitt wrote: >>> I understand the intent, but I wonder if there's a less intrusive way to >>> accomplish it, while still allowing outer tags to rescue their own >>> exceptions. What if that rescue were

Re: [Radiant] Proposal: Exception handling in container classes

2006-07-31 Thread Jay Levitt
John W. Long wrote: > Jay Levitt wrote: >> Jay Levitt wrote: >>> I understand the intent, but I wonder if there's a less intrusive way to >>> accomplish it, while still allowing outer tags to rescue their own >>> exceptions. What if that rescue were

[Radiant] Parent tag?

2006-07-30 Thread Jay Levitt
Any reason this shouldn't be part of page_context? It's incredibly handy for nav. define_tag 'parent' do |tag| tag.locals.page = page.parent tag.expand end ___ Radiant mailing list Radiant@lists.radiantcms.org http://lists.radia

Re: [Radiant] Proposal: Exception handling in container classes

2006-07-30 Thread Jay Levitt
Jay Levitt wrote: > I understand the intent, but I wonder if there's a less intrusive way to > accomplish it, while still allowing outer tags to rescue their own > exceptions. What if that rescue were executed only on the outermost > tags? Would that break anything? I

[Radiant] Proposal: Exception handling in container classes

2006-07-29 Thread Jay Levitt
Right now, render_tag (in page_context.rb) rescues all exceptions and turns them into HTML output. It'd be really nice to be able to use exceptions within behaviors - especially within container tags. F'rinstance, I've got a "style" tag that nests inside a "navigation" container, and if that

Re: [Radiant] Behavior vs. Context

2006-07-28 Thread Jay Levitt
Sean Cribbs wrote: > I've been doing this via a plugin, as follows: > > class Behavior::Base >define_tags do > tag "slicktabs" do |tag| >slicktab = SlickTabs.new(tag) >slicktab.output > end > ...other tags... >end > end

Re: [Radiant] Behavior vs. Context

2006-07-27 Thread Jay Levitt
Sean Cribbs wrote: > John et al, > > In an effort to extend Radiant for my own needs, I have discovered that > I need to create some Radius tags. Ideally, I'd like these to be part > of the PageContext class, but I'm not sure how to go about it (should I > alias/override initialize?). I'd be

[Radiant] Suggestion: error handler override

2006-07-26 Thread Jay Levitt
John, What do you think of having page_context.rb only override render_tag when RAILS_ENV isn't "test"? It'd be nice to have the error traces when developing, and I don't think this would affect the intent (to protect production sites fr

Re: [Radiant] Dynamic Menu

2006-07-25 Thread Jay Levitt
on. It may be too much for your purpose, but let me know if you want to alpha-test it. Jay Levitt ___ Radiant mailing list Radiant@lists.radiantcms.org http://lists.radiantcms.org/mailman/listinfo/radiant

Re: [Radiant] Virtual-domain behaviour

2006-07-25 Thread Jay Levitt
bodhi wrote: > > Of course, as soon as I sent this email, I scrolled up and noticed that > the accessors were already there (@_@) I have repeatedly had the same problem with this mailing list. Let me know if you find a workaround. Jay ___ Radiant m

Re: [Radiant] Rspec?

2006-07-24 Thread Jay Levitt
John W. Long wrote: > > There's a nice class method in test_helper.rb which makes it easy to > throw a bunch of methods in a module and include them with the syntax: > >test_helper :module_name I was just playing with that! Haven't brought rspec into the picture, but meanwhile I've got hp

Re: [Radiant] Rspec?

2006-07-24 Thread Jay Levitt
John W. Long wrote: > Jay Levitt wrote: >> Has anyone here tried modifying the behavior_helper to work with rspec >> rather than Test::Unit? I looove me some rspec. > > I'm not quite sure what you mean. I'm familiar with rspec, but I'm not > familiar wit

[Radiant] Rspec?

2006-07-24 Thread Jay Levitt
Has anyone here tried modifying the behavior_helper to work with rspec rather than Test::Unit? I looove me some rspec. Jay Levitt ___ Radiant mailing list Radiant@lists.radiantcms.org http://lists.radiantcms.org/mailman/listinfo/radiant

Re: [Radiant] Page Parts as Attachments, Tags, Images, Events, etc.

2006-07-24 Thread Jay Levitt
dror tirosh wrote: > I also talked before in this thread about moving behaviors to the page > part level (from the page level), I think this will allow adding a lot > of functionality to websites based on Radiant. Whatdo you think? +1 > > Dror > > > ---

Re: [Radiant] Page Parts as Attachments, Tags, Images, Events, etc.

2006-07-24 Thread Jay Levitt
Keith Bingman wrote: > I just noticed a bug in this: when deleting a page part, while it give a > confrimation, deletes the attached file/image/whatever, the page part is > still there when the page is reloaded. This is true of any page part, > not just attachments. I will try to see what is goi

Re: [Radiant] Page Parts as Attachments, Tags, Images, Events, etc.

2006-07-23 Thread Jay Levitt
Paul Smith wrote: > John W. Long wrote: > >> Ryan Platte wrote: >> >>> So it sounds like Radiant (or at least its core) shalt not grow a feature >>> set much beyond what it has now. To try out ideas like I've described, >>> can I get commit access on a branch, or do I fork? >> Would something lik

Re: [Radiant] Suggestion: uncacheable tag

2006-07-23 Thread Jay Levitt
John W. Long wrote: > John W. Long wrote: >> I actually find this quite funny as I have done very little optimization >> on Radiant. It just proves that the method used for caching static pages >> was sound. > > There are a couple of pictures in his photo stream that feature Radiant. > I found

Re: [Radiant] Suggestion: uncacheable tag

2006-07-22 Thread Jay Levitt
John W. Long wrote: > Jay Levitt wrote: >> John W. Long wrote: >>> Editing a snippet or layout will invalidate the entire cache. >> Ah, but the problem is that if I edit a page somewhere else - say, I >> change the title - the navigation snippet now needs to be r

Re: [Radiant] Suggestion: uncacheable tag

2006-07-22 Thread Jay Levitt
John W. Long wrote: >class UncacheableBehavior < Behavior::Base > register "Uncacheable" > > def cache_page? >false > end >end Perfect. I don't think there's any reason for a tag, then - anything that's going to be dynamic is going to involve code, and thus it can

[Radiant] Suggestion: uncacheable tag

2006-07-21 Thread Jay Levitt
when -any- page is saved, not just when the particular page it's used on is regenerated. I'm not sure if there's a clean way to deal with that right now, or what the best solution is - maybe a "depends-on-world" tag which, if present, expires this snippet whenever any ot

Re: [Radiant] Tags using a snippet as a block parameter?

2006-07-21 Thread Jay Levitt
snippet, what I'd really like to do is: I imagine I can figure out the contents of the container tag and parse them, but I can't think of a way to then skip over those contents when rendering the actual page - they'll get parsed by the real parser. Is ther

Re: [Radiant] Early Radiant translation

2006-07-20 Thread Jay Levitt
Dean Strelau wrote: > On 7/20/06, *James MacAulay* <[EMAIL PROTECTED] > > wrote: > > The only problem I see with doing text on static images is that, in > the long term, some translations may be quite a bit longer or > shorter than others. I guess the transla

Re: [Radiant] Tags using a snippet as a block parameter?

2006-07-19 Thread Jay Levitt
So, back to the original question: > This works, if I snag @parser from Behavior: > >if (tag.attr['page_snippet']) > p @parser.parse(%Q||) > ... > > Is that the right way to do it? Am I headed for trouble? ___ Radiant mailing list Radia

Re: [Radiant] Tags using a snippet as a block parameter?

2006-07-19 Thread Jay Levitt
John W. Long wrote: > Kyle Heon wrote: >> In regards to hyphens versus underscores, I prefer hyphens too. > > I think I prefer underscores. Radius is loosely based on Ruby so it uses > underscores. If I wrote it in scheme I might prefer hyphens. :-) > > Actually, it's probably better if we stick

Re: [Radiant] ActionView helpers in a behavior - I think I got it!

2006-07-18 Thread Jay Levitt
John W. Long wrote: > Jay Levitt wrote: >> That'd be really nice, actually. I think that's what I was >> (unknowingly) asking for last month, when I got the advice to create a >> dummy controller. John, do you think it might be possible to get at the >

[Radiant] Tags using a snippet as a block parameter?

2006-07-18 Thread Jay Levitt
llow hyphens in attribute names for some reason. Anyway.) Snippet nav-pages: This works, if I snag @parser from Behavior: if (tag.attr['page_snippet']) p @parser.parse(%Q||) ... Is that the right way to do it? Am I headed

Re: [Radiant] ActionView helpers in a behavior - I think I got it!

2006-07-18 Thread Jay Levitt
Andrew Hodgkinson wrote: > Jay Levitt wrote: > >> Thanks. If I run into any weird side effects I'll start by assuming >> they're not my fault now... > > Well, kind of; I think the "Right Answer" might be to modify the > Behavior API so that Rad

Re: [Radiant] ActionView helpers in a behavior - I think I got it!

2006-07-18 Thread Jay Levitt
Andrew Hodgkinson wrote: > Jay Levitt wrote: > >> @controller = ActionController::Base.new >> @controller.request = request > > I think you might have to be careful with certain helper method calls - > ISTR seeing something about this on IRC. In particular som

[Radiant] ActionView helpers in a behavior - I think I got it!

2006-07-17 Thread Jay Levitt
Here's the relevant parts of a navigation-tab plugin I'm in the process of hacking together... and I have just successfully called image_path from it. Hope this helps someone. class Behavior::Base define_tags do tag "navtab" do |tag| tab = NavTab.new(tag.attr['label'], @request)

Re: [Radiant] First draft of the "Using Radiant" page of the Handbook

2006-07-16 Thread Jay Levitt
Jay Levitt wrote: > Andrew Hodgkinson wrote: >> In an effort to learn more about Radiant, I've just completed a first >> draft of the "Using Radiant" page of the Handbook within the Radiant >> Wiki at: > > This is great! Considering that the existing h

Re: [Radiant] First draft of the "Using Radiant" page of the Handbook

2006-07-16 Thread Jay Levitt
to change the link from the main page, other than modesty? Relatedly: I don't really know what this wiki's rules are; should we be getting permission from John first before making edits, or just diving in and editing it like a community wiki? I'd love to cont

[Radiant] Sortability - status?

2006-07-16 Thread Jay Levitt
by hand, which is doable (small site) but silly. Jay Levitt ___ Radiant mailing list Radiant@lists.radiantcms.org http://lists.radiantcms.org/mailman/listinfo/radiant

Re: [Radiant] Modified Engines Patch

2006-07-16 Thread Jay Levitt
[EMAIL PROTECTED] wrote: > Alright enough talk, time for some code. I've submitted a patch to help > alleviate all of our woes and give developers who are currently developing > extensions and things a chance to do it on a platform that might be viable > going forward. > 1. A modified version of t

Re: [Radiant] Radiant Plugins and Philosophy

2006-07-13 Thread Jay Levitt
John W. Long wrote: > Jay Levitt wrote: >>> Yup. We do. If this is ugly and hard to maintain against the current >>> Rails code base I'd like to see if we can get the core changes we need >>> pushed back into Rails. It seems like views and routing are the hard

Re: [Radiant] Radiant Plugins and Philosophy

2006-07-13 Thread Jay Levitt
create plugins with views > that use existing layouts, but Rails makes this hard because it only > allows a controller to use one directory structure as it's base view > directory. Aren't these (mostly) exactly the same problems that Engines solve? Jay Levitt > > Plea

Re: [Radiant] Google sitemap.xml support + ActionView helpers in behaviors?

2006-07-10 Thread Jay Levitt
Xavier wrote: > Hi folks, > > I added a tiny extra chunk of code in my SiteController to generate a > sitemap.xml file ( > http://www.google.com/support/webmasters/bin/topic.py?topic=8467 ) > from the list of all published pages. > > If there's any wider interest for such a feature, I could packa

[Radiant] Access to dummy ActionController?

2006-07-04 Thread Jay Levitt
r = controller >end > >def self.url_for(options) > @@controller.url_for(options) if @@controller > end > end Any chance SiteController could do this for us? Jay Levitt ___ Radiant mailing list Radiant@lists.radiantcms.org http://lists.radiantcms.org/mailman/listinfo/radiant