Re: [Radiant] Re: Re: Radiant documentation - summer reboot

2008-06-17 Thread Casper Fabricius

Hi David,

I've always found building the navigation system in Radiant quite a  
hassle, so I have recently added an r:menu / to my fork of radiant (http://github.com/RSpace/radiant/tree/master 
) and submitted a pull request to Sean. I have no idea if it will make  
it into Radiant 0.6.8 or even into core at all, but if is does, it  
should deprecate most of the r:if_self r:if_ancestor business. It is  
very similar to r:navigation /, but it generates the menu using the  
existing page hierarchy in the database, rather than requiring the  
developer to hard code it in the tag attributes.


By the way, Mohit, did you create a page in the wiki with your  
outline? I can't seem to find it.


Cheers,
Casper


On 16/06/2008, at 16:47, David Piehler wrote:


Mohit Sindhwani wrote:

Sorry for the delay in pushing this out.  This is roughly the first
draft of the plan that I had.  This is not split up into the sections
that I had mentioned.  I think some of these can be mixed and matched
into the different sections.  In general, this targets a person who  
is

starting with Radiant but is actually a developer.  I'm sure there's
plenty more that can/ should go in, but I'm just passing this as a
starting point.


This looks great. The only thing I noticed was missing is a topic on
navigation systems. I say we start with your outline in the wiki and
move ahead from there. We can always adjust the outline as we progress
if we need to.

In the wiki outline, should we mark what topics we would like to  
work on
so we don't duplicate effort? I think having multiple people work on  
the

same topic is fine, but they should probably coordinate their effort.

Silly question -- when working with the wiki, how do you create new
pages? Do you just make a link to them and it recognizes a new page  
has

been made... or something?

I have Friday off from work, and will begin working on wiki content. I
think I'll start with these topics:
* navigation systems (simple using r:navigation; complex using  
r:if_self

and r:if_ancestor_or_self and part=no-map)
* using some of the common extensions

- Dave


--
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 mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Wrapping the surrounding html code with tag(s) return value

2008-06-17 Thread Jim Gay

You'd need to write a tag that wraps it.

tag 'myext:model:if_something' do |tag|
  tag.expand if (your code to check that value)
end

that would expand the tag only if that something is set the way you  
want, and your radius/html would look like this:


r:myext:model:if_something
 h1. Some Header

 r:myext:model:something /
/r:myext:model:if_something

There are probably other ways to do it too, but that's the simplest  
one that comes to mind.


On Jun 17, 2008, at 3:53 AM, nn wrote:


Let's say I have the fallowing:

 h1. Some Header

 r:myext:model:something /

I need to check if myext:model:something is blank, and if it is h1.
Some Header should not be shown. If its not blank, then the header is
shown. Any sugestions?
___
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] Re: Layouts, snippets and site assets on the file system?

2008-06-17 Thread Jonathan McCoy
Jonathan McCoy wrote:
 In parallel, it would be nice to add another basic user-level of 
 Designer, for managing Snippets - in the absence of SCM/file support 
 for layouts/partials.
 
 In keeping designs and code DRY, we find ourselves using snippets to 
 contain more than user-editable content, and use them heavily for 
 fragments of design logic. As such, we want to keep day-to-day users far 
 away from anything that can cause damage to the site.
 
 Standard (Pages) - Designer (+ Snippets) - Administrator (+ Layouts, 
 Users, etc)
 
 Does the Developer flag do anything in production mode?
 
 Thanks,
 Jon.

I've monkey-patched a frozen version of Radiant (0.6.7) with some of the 
functionality I lusted for above. No testing or a designer flag (just 
put snippets on the Admin/Dev level). I'd be more inclined to assemble 
patches and tests (to the spec above) if anybody else was interested in 
it being pushed into the trunk?

Would be nice to review the user levels available - or if we're all 
feeling code-happy, granular access control. I can foresee the need for 
the following roles at least:

1. Content Monkey (pages + preferences)
2. Designer (+ layouts + snippets)
3. Developer (+ extensions)
4. Administrator (+ user management)

In hindsight to my previous post, I'd keep the developer flag for the 
benefit of extensions/plugins that need technical setup. Another 
question, is whether flags are more desirable than a user-level number 
(ie 1 to 4) or even a class-name, which can be mapped out to a role 
name. A popup list with userlevels can be used instead. It removes the 
uncertainty of having admin flagged, but developer unflagged - what 
rights does the user have?!

I am having trouble finding where the user-level is set for the tab 
display - I've traced back through all the libraries, but can't seem to 
find (or rather see) where snippets (or rather other admin/dev tabs) are 
set...

Cheers,
Jon.
-- 
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] Troubles with r:if_self

2008-06-17 Thread Nancy Carroll
Hmmm, there is obviously something I am missing with regards to 
r:if_self and r:if_ancestor_or_self and Radiant 0.6.6.


I've made a little menu, and it works just fine, except that all cases 
of r:if_self are simply ignored, and a blank space is inserted in my 
rendered html.


In the case of r:if_ancestor_or_self a:
divstrongundefined method `url' for nil:NilClass/strong/div
is rendered for each child element, and the class is also not inserted 
here either.


 My Menu ---
div id=navigation
 r:find url=/
 ul
   r:children:eachr:unless_content part=navhide   
   li id=r:slug / r:if_selfclass=current/r:if_self 
r:linkr:title //r:link

   r:if_children
   r:unless_content part=navhide
   ul id=r:title /-submenu
  r:children:each
  li id=r:slug / 
r:if_ancestor_or_selfclass=here/r:if_ancestor_or_self 
r:linkr:title //r:link/li

  /r:children:each
   /ul
   /r:unless_content
   /r:if_children
   /li
   /r:unless_content
   /r:children:each
   /ul
 /r:find
/div

--

Anybody know why this isn't working like I expect it to?  I imagine it's 
an assumption of mine...


In any case, thanks in advance!
Nancy








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


Re: [Radiant] Password Protect an entire instance

2008-06-17 Thread Josh Schairbaum

Sean,

Thanks for the tips.  I've also got the multi-site extension  
installed, would it be possible to completely password protect one  
site, but not the other?  Meaning, could the filter on SiteController  
figure out which page was the root of the site and use it that way?


Regards,
Josh

On Jun 4, 2008, at 11:37 AM, Sean Cribbs wrote:

RadiantOnRails is about a year old and thus not recommended.  I  
recommend creating an extension that injects a before filter into  
SiteController so as to intercept the login and also turns on  
sessions.  You would also need to make your own member model,  
perhaps using a plugin like acts_as_authenticated, and wire up the  
appropriate routes.


Sean

Josh Schairbaum wrote:
I've searched around on the Mailing List archive and I haven't seen  
this question asked, so here goes:


I want to password protect an entire Radiant instance, with the  
exception of allowing users to sign up.  I'd like to avoid HTTP  
authentication, if at all possible.  The standard user would not be  
able to edit content, so they wouldn't need access to any of the  
Admin UI.


Does anyone have any ideas how this could be accomplished?  Could  
this be done by using RadiantOnRails for the signup/authentication  
and then an extension that would check for authentication before  
showing the page?


Regards,
Josh
___
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] Troubles with r:if_self

2008-06-17 Thread Nancy Carroll

Hi Sean,
Thanks for your tips!  I've applied them all except the one about 
r:unless_content.  I have pages on both levels that I would prefer not 
show up in the menu, and I couldn't convince the outer one to filter the 
inner ones as well.  Unfortunately, nothing has changed with regard to 
r:if_self et al. 


I'll keep trying though, and thanks again.
Nancy


Sean Cribbs schrieb:

Nancy,

I'm not sure why they do not work for you or where that error comes 
from, but here's a couple tips.


Your inner r:unless_content is a duplication of logic from the outer 
scope.  I think you probably want it on the inside of the inner 
r:children:each.


If you want to use the title of the page in a link to the page, just 
use r:link /, not r:linkr:title //r:link.  The title is the 
default text of the link.


Using r:title / in the id attribute for the submenu might break the 
prohibition on spaces in that attribute.  r:slug / would be a better 
choice.


Sean

Nancy Carroll wrote:
Hmmm, there is obviously something I am missing with regards to 
r:if_self and r:if_ancestor_or_self and Radiant 0.6.6.


I've made a little menu, and it works just fine, except that all 
cases of r:if_self are simply ignored, and a blank space is 
inserted in my rendered html.


In the case of r:if_ancestor_or_self a:
divstrongundefined method `url' for nil:NilClass/strong/div
is rendered for each child element, and the class is also not 
inserted here either.


 My Menu ---
div id=navigation
 r:find url=/
 ul
   r:children:eachr:unless_content part=navhide  li 
id=r:slug / r:if_selfclass=current/r:if_self 
r:linkr:title //r:link

   r:if_children
   r:unless_content part=navhide
   ul id=r:title /-submenu
  r:children:each
  li id=r:slug / 
r:if_ancestor_or_selfclass=here/r:if_ancestor_or_self 
r:linkr:title //r:link/li

  /r:children:each
   /ul
   /r:unless_content
   /r:if_children
   /li
   /r:unless_content
   /r:children:each
   /ul
 /r:find
/div

--

Anybody know why this isn't working like I expect it to?  I imagine 
it's an assumption of mine...


In any case, thanks in advance!
Nancy








___
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] Re: Re: Re: Radiant documentation - summer reboot

2008-06-17 Thread David Piehler
Casper Fabricius wrote:
 I've always found building the navigation system in Radiant quite a
 hassle, so I have recently added an r:menu / to my fork of radiant 
 (http://github.com/RSpace/radiant/tree/master
 ) and submitted a pull request to Sean. I have no idea if it will make
 it into Radiant 0.6.8 or even into core at all, but if is does, it
 should deprecate most of the r:if_self r:if_ancestor business. It is
 very similar to r:navigation /, but it generates the menu using the
 existing page hierarchy in the database, rather than requiring the
 developer to hard code it in the tag attributes.

That's a fantastic idea, and I hope it moves into the core. For now, 
I'll still post my navigation how-to, with the hopes we can deprecate it 
in the near-future.

- Dave
-- 
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


Re: [Radiant] Re: Re: Radiant documentation - summer reboot

2008-06-17 Thread Mohit Sindhwani

Casper Fabricius wrote:

Hi David,

I've always found building the navigation system in Radiant quite a 
hassle, so I have recently added an r:menu / to my fork of radiant 
(http://github.com/RSpace/radiant/tree/master) and submitted a pull 
request to Sean. I have no idea if it will make it into Radiant 0.6.8 
or even into core at all, but if is does, it should deprecate most of 
the r:if_self r:if_ancestor business. It is very similar to 
r:navigation /, but it generates the menu using the existing page 
hierarchy in the database, rather than requiring the developer to hard 
code it in the tag attributes.


By the way, Mohit, did you create a page in the wiki with your 
outline? I can't seem to find it.


Cheers,
Casper


I'm sorry I've been unavailable because we're participating at a trade 
show and it's been very busy putting things together for that.  Should I 
create this as a separate page in the wiki, a separate page under the 
handbook, or as inidividual items in the handbook?  I would like to 
initially treat this as a separate 'handbook' called 'Documentation - 
Summer Reboot' rather than into the main handbook.  Hopefully, it will 
be easy to move pages around later?


Would do you guys think?

Cheers,
Mohit.
6/17/2008 | 11:20 PM.


___
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: Re: Radiant documentation - summer reboot

2008-06-17 Thread David Piehler
Mohit Sindhwani wrote:
 I would like to
 initially treat this as a separate 'handbook' called 'Documentation -
 Summer Reboot' rather than into the main handbook.  Hopefully, it will
 be easy to move pages around later?

I prefer this idea, as long as renaming the main section once we are 
done doesn't break a whole bunch of link slugs.

- Dave


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


Re: [Radiant] Re: Re: Re: Admin Tree Extension

2008-06-17 Thread Keith Bingman

Keith Bingman wrote:

This is now on Github at
http://github.com/kbingman/admin_tree_structure/tree/master
It would be great if someone could chekc it out and see if it works
for them. I have it working under the 0.6.6 Gem.


If anyone is still using the old drag-and-drop page Reorder extension,
be aware that this AdminTreeStructure extension cannot be run  
alongside

of it.
--


Actually, this is pretty easy to fix, but needs to be done in the  
reorder extension. If anyone is interested, I can post the modified  
one I have on github. 
___

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


Re: [Radiant] Wrapping the surrounding html code with tag(s) return value

2008-06-17 Thread nn
Hi Jim,

Thanks for the reply.

On Tue, Jun 17, 2008 at 1:18 PM, Jim Gay [EMAIL PROTECTED] wrote:
 You'd need to write a tag that wraps it.

 tag 'myext:model:if_something' do |tag|
  tag.expand if (your code to check that value)
 end

 that would expand the tag only if that something is set the way you want,
 and your radius/html would look like this:

 r:myext:model:if_something
  h1. Some Header

  r:myext:model:something /
 /r:myext:model:if_something

 There are probably other ways to do it too, but that's the simplest one that
 comes to mind.

I was a bit hasty, sorry about that. The problem is slightly different:

  div class=item
h1Some Header/h1
ul
r:item:each param=some value
  lia href=/some/url/#{item.id}r:item.attrib1 /
r:item.attrib2 //a/li
/r:item:each
/ul
  /div

  div class=item
h1Another Header/h1
ul
r:item:each param=another value
  lia href=/some/url/#{item.id}r:item.attrib1 /
r:item.attrib2 //a/li
/r:item:each
/ul
  /div

where r:item:each returns the items from the database by param's
value. I'd like to wrap the header so that it shows only if there is
something to be shown in the list under it (inside the div). I haven't
been able to figure it out, and the best I've managed to do so far is
to repeatedly show the content I want to wrap (like its multiplied by
the list size).
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant