[Radiant] Haml and textareas in custom extension

2008-07-13 Thread Gert Jørgensen
Hi and first - thank you for making radiant, I've used many many cms'es
and this is by far the best I have used yet!

I have made a custom extension and created an admin area for the models
where I have a problem with a textarea. I have never used Haml so my
views are all html.erb files.

The problem is that the admin-area seems to parse my templates as haml
files and thus adds spaces after each line break in my textareas.

Example output (less-than and greater-than replaced with {}:

{textarea class="textarea" cols="40" id="collection_body"
name="collection[body]" rows="20">This is the best brand ever.

  Look how cool this text is.

  {a href="http://gert.dk"}gert.dk{/a}{/textarea}

Is there anyway to either use the find_and_preserve method in a html.erb
view or turn off haml-parsing for my custom part of the admin area?

Thanks in advance!
-- 
Posted via http://www.ruby-forum.com/.
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


[Radiant] Re: Haml and textareas in custom extension

2008-07-13 Thread Gert Jørgensen
I'm on Radiant 0.6.7 gem version - is there a newer version I'm not 
aware about?

And.. Aha!! My controller is extending the ApplicationController, is 
there a radiant specific controller I should be extending instead?
-- 
Posted via http://www.ruby-forum.com/.
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


[Radiant] Re: Haml and textareas in custom extension

2008-07-15 Thread Gert Jørgensen
I have looked at the extension tutorial again and the controller there 
extends the ApplicationController like I do.

Any ideas about what I could try and look at?
-- 
Posted via http://www.ruby-forum.com/.
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


[Radiant] Re: Haml and textareas in custom extension

2008-08-04 Thread Gert Jørgensen
Hi,

just wanted to let everybody know that this is fixed in 0.6.9, maybe 
also in 0.6.8 but I skipped that version.

Thanks again.
-- 
Posted via http://www.ruby-forum.com/.
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


[Radiant] Possible to disable cache for a single page?

2008-08-04 Thread Gert Jørgensen
Hi,

I have a list of thumbnails and when clicked they open a larger image in
a popup window.

I have a page in radiant with a  tag for the popup and
supply an img-parameter to the page that I use in the tag that looks
like this:

tag 'press_image' do |tag|
  html = ""
  img = tag.globals.page.request.parameters[:img].nil? ? nil :
tag.globals.page.request.parameters[:img].to_i
  item = PressAttachment.find(img) if img
  html = '' if item
  html
end

Works fine on my machine where cache is disabled but on the live server
the popup is cached and it always displays the first image viewed
because of the cache.

My question is if I can disable the cache for a single page or if anyone
has a suggestion to how I could achive this otherwise.

Thanks in advance, love working with radiant and my clients too :)
-- 
Posted via http://www.ruby-forum.com/.
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


[Radiant] Re: Re: Possible to disable cache for a single page?

2008-08-05 Thread Gert Jørgensen
Hi Sean,

thank you for your answer, works perfectly. I made a no_cache_page.rb in 
my models folder for my extension and put this in it:

class NoCachePage < Page
  def cache?
false
  end
end

To activate it I just put NoCachePage in the activate method of my 
extension.

Btw. a possible subject for the Summer Reboot could be explaining the 
different ways you include your extension files in the activate method, 
right now I have a mix that I have found in different extensions looking 
like this:

NoCachePage
Page.send :include, CollectionTags
Page.send :include, PressTags

The NoCachePage thing I found in the MailerExtension while the Page.send 
examples are from the PageAttachments extension, but now I see that the 
MailerExtension's tags are included without using Page.send. Is there 
anything already written on this subject?

Thanks again for making the most enjoyable cms around and the nice 
support here.
-- 
Posted via http://www.ruby-forum.com/.
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


[Radiant] Comments extension

2008-09-10 Thread Gert Jørgensen
Hi,

I'm trying to use the comments extension found at:
http://github.com/artofmission/radiant-comments/tree/master

I'm following the README at:
http://github.com/artofmission/radiant-comments/tree/master/README.rdoc

and it seems everything works except one thing:

When posting a new comment from the website I get this error:
http://pastie.org/269694

I also get it when accessing the index method of the CommentsController,
it's the call to @page.render

The README states:
Relative urls will not work on comment pages if they fail validation,
since the page gets re-rendered at a (probably) different level of the
hierarchy. Always use absolute urls and you won’t have any issues.

Is this what I'm running into? Any ideas of where to go from here?

Thanks !
-- 
Posted via http://www.ruby-forum.com/.
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


[Radiant] Re: Comments extension

2008-09-10 Thread Gert Jørgensen
Thank you, that works perfectly.

Note to other users, I added this line:

@page.request = request

to the "find_page" method in 
vendor/extensions/comments/app/controllers/comments_controller.rb
-- 
Posted via http://www.ruby-forum.com/.
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


[Radiant] Re: Re: Comments extension

2008-09-10 Thread Gert Jørgensen
Hi - yes I'll try to write it down - have been thinking of doing 
something for the reboot and this might be a good start.
-- 
Posted via http://www.ruby-forum.com/.
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant