[Radiant] Navigation Menu with Sub Nav
For other noobs like me that are looking at how to create a navigation menu with sub nav, here is an example I created below. I couldn't get r:navigation to do it or the navigation_tags extension to work properly. I'm sure there is a better way to do this so please offer your suggestions on how to do this if you know of a better way. ul r:find url=/ r:children:each r:unless_content part=no-nav r:if_ancestor_or_self r:if_self li class=currentr:link / /r:if_self r:unless_self li class=current with-childrenr:link / /r:unless_self r:if_children ul r:children:each r:if_self li class=currentr:link //li /r:if_self r:unless_self lir:link //li /r:unless_self /r:children:each /ul /r:if_children /li /r:if_ancestor_or_self r:unless_ancestor_or_self lir:link //li /r:unless_ancestor_or_self /r:unless_content /r:children:each /r:find /ul ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
[Radiant] Is there an extension for rotating or random images?
I could have sworn that I had seen an extension that would either load a random image or rotate images banner-style, but I cannot find it. I need to to be able to set a random background image for a div each time the page is loaded/re-loaded. Does anybody know what I am talking about? I thought I had seen an extension that would do this one time, but with the serious lack of sleep I am experiencing I cannot find it. Thanks, ~Nate ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Is there an extension for rotating or random images?
On Wed, May 13, 2009 at 8:07 AM, N. Turnage pixeln...@gmail.com wrote: I could have sworn that I had seen an extension that would either load a random image or rotate images banner-style, but I cannot find it. I need to to be able to set a random background image for a div each time the page is loaded/re-loaded. Does anybody know what I am talking about? I thought I had seen an extension that would do this one time, but with the serious lack of sleep I am experiencing I cannot find it. not sure about any particular extension but the random/options radius tags are a part of radiant core. r:random r:optiona/r:option r:optionb/r:option r:optionc/r:option /r:random and since 0.6.9 (i think) the options can be dynamic so if you had page_attachments installed and a bunch of images attached to a banner page you could do something like: r:find url='/banners' r:random r:attachment:each r:optionimg src='r:url/'/r:option /r:attachment:each /r:random /r:find ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Is there an extension for rotating or random images?
Although it's very specific to Con-way's use case, the banner_rotator extension does just that. A word of caution though -- the image choice will be cached along with the page, so your only chance of a new one is every 5 minutes. Sean N. Turnage wrote: I could have sworn that I had seen an extension that would either load a random image or rotate images banner-style, but I cannot find it. I need to to be able to set a random background image for a div each time the page is loaded/re-loaded. Does anybody know what I am talking about? I thought I had seen an extension that would do this one time, but with the serious lack of sleep I am experiencing I cannot find it. Thanks, ~Nate ___ 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] Is there an extension for rotating or random images?
I know I'll come off as the guy who turns to the javascript hammer every time he needs a tool to fix a problem -BUT, that'd be a 3 or 4 line implementation with some JS. Or is that out of the question for your purposes? - Joel On May 13, 2009, at 10:07 AM, N. Turnage pixeln...@gmail.com wrote: I could have sworn that I had seen an extension that would either load a random image or rotate images banner-style, but I cannot find it. I need to to be able to set a random background image for a div each time the page is loaded/re-loaded. Does anybody know what I am talking about? I thought I had seen an extension that would do this one time, but with the serious lack of sleep I am experiencing I cannot find it. Thanks, ~Nate ___ 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] Is there an extension for rotating or random images?
Joel Oliveira wrote: I know I'll come off as the guy who turns to the javascript hammer every time he needs a tool to fix a problem -BUT, that'd be a 3 or 4 line implementation with some JS. Or is that out of the question for your purposes? I thought there was something more Radiant specific. Maybe it was the banner rotator that I was thinking of, but I don't think I that will work for what I am trying to do. In an ideal world, what I want to do would be this: The css background-image property of a div would use a random image from a directory of images that have completely random names. The client I am building a site for has a Phanfare feed, and I would like to use their images as backgrounds. I was thinking about setting up a cron job to pull images from their feed into a directory on the web server, then randomly choose an image from that directory. Every javascript solution I have seen requires that the images be named samename_#.jpg and and a random number is chosen and added into the filename. That is probably something I can achieve with the radiant random number generator and a stylesheet. I was looking for a more automated solution. Do you know of any javascripts or jQuery scripts that would allow for non-uniform file names? ~Nate ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Is there an extension for rotating or random images?
Actually, it sounds like John Muhl's solution will work best for you - you could even keep it tucked away in a snippet. div style=background-image:r:snippet name=banner /.../div Sean N. Turnage wrote: Joel Oliveira wrote: I know I'll come off as the guy who turns to the javascript hammer every time he needs a tool to fix a problem -BUT, that'd be a 3 or 4 line implementation with some JS. Or is that out of the question for your purposes? I thought there was something more Radiant specific. Maybe it was the banner rotator that I was thinking of, but I don't think I that will work for what I am trying to do. In an ideal world, what I want to do would be this: The css background-image property of a div would use a random image from a directory of images that have completely random names. The client I am building a site for has a Phanfare feed, and I would like to use their images as backgrounds. I was thinking about setting up a cron job to pull images from their feed into a directory on the web server, then randomly choose an image from that directory. Every javascript solution I have seen requires that the images be named samename_#.jpg and and a random number is chosen and added into the filename. That is probably something I can achieve with the radiant random number generator and a stylesheet. I was looking for a more automated solution. Do you know of any javascripts or jQuery scripts that would allow for non-uniform file names? ~Nate ___ 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] [ANN] admin_data extension
After finding the admin_data plugin, I thought it would be a useful way to view, edit an search for data in a Radiant database. I've written about it here: http://www.saturnflyer.com/blog/jim/2009/05/13/view-edit-and-search-your-radiantcms-database/ And the repo may be found at: http://github.com/saturnflyer/radiant-admin_data-extension/tree/master It inspects your database tables and loads models accordingly. Then, you'll have an interface to view your data outside of the Radiant interface. This might be useful if you want to have more direct access to the data, but not need to use script/console or don't want to reveal it to your clients. Read about the plugin here: http://neeraj.name/blog/articles/833-plugin-admin_data-for-browsing-searching-editing-and-managing-database-records Jim Gay http://www.saturnflyer.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] Is there an extension for rotating or random images?
Sean Cribbs wrote: Actually, it sounds like John Muhl's solution will work best for you - you could even keep it tucked away in a snippet. div style=background-image:r:snippet name=banner /.../div That worked like a charm! Thanks, Sean John. I hadn't even thought about using a snippet in an inline style. ~Nate ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
[Radiant] Templates Extension: Important Update
To anyone using Templates extension with Radiant 0.7 or greater: We discovered an issue today which could cause the creation of a child page with a nil parent_id. The scenario is when you create a new child page with a given template, and then change the template before the initial save. In this case the parent_id is lost. We corrected this by updating the switch_templates partial to conform to RESTful routes. So if you are using Template Extension with Radiant 0.7, be sure to pull from master. Best, Andrew vonderLuft ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Templates Extension: Important Update
Andrew vonderLuft wrote: To anyone using Templates extension with Radiant 0.7 or greater: We discovered an issue today which could cause the creation of a child page with a nil parent_id. The scenario is when you create a new child page with a given template, and then change the template before the initial save. In this case the parent_id is lost. We corrected this by updating the switch_templates partial to conform to RESTful routes. So if you are using Template Extension with Radiant 0.7, be sure to pull from master. Thanks for fixing this. I had run into it a couple of times, but could never figure out how to reproduce the error 'reliably'. ~Nate ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Navigation Menu with Sub Nav
Christian Nikolajsen wrote: Hi Mohit sorry I never got back to you on your example. I tried it out and it's been causing problems for me and I'm getting the same problems with the example from Dan. When I try your examaples I get the following error message: NoMethodError in SiteController#show_page You have a nil object when you didn't expect it! The error occurred while evaluating nil.url Any thoughts on this would be appreciated (and again my apologies to Mohit for not answering him on his last post :) Hi Christian It seems to be that one of the finds is failing or something. Could you post the exact snippet you are using? Cheers, Mohit. 5/14/2009 | 11:37 AM. ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Navigation Menu with Sub Nav
Hi Mohit, A thought occured to me and I tried your code on a clean radiant install and it works perfectly. Both yours and Dans code example. Maybe some extension I have installed is causing the trouble? These are the extenstions I have installed: copy_move mailer settings dashboard navigation_tags sns drag_order news user_home help paperclipped wym_editor_filter /Christian 2009/5/14 Mohit Sindhwani t...@onghu.com Christian Nikolajsen wrote: Hi Mohit sorry I never got back to you on your example. I tried it out and it's been causing problems for me and I'm getting the same problems with the example from Dan. When I try your examaples I get the following error message: NoMethodError in SiteController#show_page You have a nil object when you didn't expect it! The error occurred while evaluating nil.url Any thoughts on this would be appreciated (and again my apologies to Mohit for not answering him on his last post :) Hi Christian It seems to be that one of the finds is failing or something. Could you post the exact snippet you are using? Cheers, Mohit. 5/14/2009 | 11:37 AM. -- Venlig hilsen / Best Regards Christian Nikolajsen Tech Trooper of CreatingSite e-Commerce Mobile: +45 30624263 Mail: christ...@nikolajsen.net ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Navigation Menu with Sub Nav
Christian Nikolajsen wrote: Hi Mohit, A thought occured to me and I tried your code on a clean radiant install and it works perfectly. Both yours and Dans code example. Maybe some extension I have installed is causing the trouble? These are the extenstions I have installed: copy_move mailer settings dashboard navigation_tags sns drag_order news user_home help paperclipped wym_editor_filter I can tell you that copy_move and settings definitely seem to work with it because I have those installed. Could it be that navigation_tags causes some problem? I'm really not sure what could cause the trouble because my code uses built-in Radiant tags so technically that should work in all cases :P Cheers, Mohit. 5/14/2009 | 12:59 PM. ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Navigation Menu with Sub Nav
Aha! Found the culprit, you were right it is navigation_tags causing my grief.Thanks for the help. /Christian 2009/5/14 Mohit Sindhwani t...@onghu.com Christian Nikolajsen wrote: Hi Mohit, A thought occured to me and I tried your code on a clean radiant install and it works perfectly. Both yours and Dans code example. Maybe some extension I have installed is causing the trouble? These are the extenstions I have installed: copy_move mailer settings dashboard navigation_tags sns drag_order news user_home help paperclipped wym_editor_filter I can tell you that copy_move and settings definitely seem to work with it because I have those installed. Could it be that navigation_tags causes some problem? I'm really not sure what could cause the trouble because my code uses built-in Radiant tags so technically that should work in all cases :P Cheers, Mohit. 5/14/2009 | 12:59 PM. -- Venlig hilsen / Best Regards Christian Nikolajsen Tech Trooper of CreatingSite e-Commerce Mobile: +45 30624263 Mail: christ...@nikolajsen.net ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Navigation Menu with Sub Nav
Christian Nikolajsen wrote: Aha! Found the culprit, you were right it is navigation_tags causing my grief. Thanks for the help. /Christian Glad to know! Now, it's time for someone to add this to the wiki :P *hint hint* Cheers, Mohit. 5/14/2009 | 1:21 PM. ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant