Re: [Radiant] r:cycle explaination
On 28/12/2007, Nevin Freeman [EMAIL PROTECTED] wrote: I am trying to set up a page that will display one random embedded object (a youtube video) out of a pool of 30. That is to say, I want to have 30 videos, and on each page load a video object will be chosen at random (or in order, so long as they change) and rendered. Can I do this somehow that's not too round-about with r:cycle? Thanks, -- Nevin For random order use r:random r:optionChoice 1/r:option r:optionChoice 2/r:option r:random Farrel ___ Radiant mailing list Post: Radiant@lists.radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] access one specific child
On 20/04/07, Raphael Bauduin [EMAIL PROTECTED] wrote: Hi, is there a way to select one specific child, in contrast to iterating over all of them? Something like children:each slug=child-slug or child slug=child-slug. r:find url=/path/to/child ... /r:find Farrel ___ Radiant mailing list Post: Radiant@lists.radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] vim plugin
On 09/03/07, Raphael Bauduin [EMAIL PROTECTED] wrote: Hi, I've played with vim's features, including its ruby scripting capabilities, and got a little proof of concept running to edit Radiant pages, layouts, snippets directly from vim. It's currently in a pre-alpha, really proof of concept stage, but I could use help and suggestions to develop it further. Currently you can open and write already existing content. For example :edit radiant/pages/Home\ Page/First\ Post/body will let you edit the body part of the First Post, which is located under the Home Page. One problem I need to fix is that newlines are displayed as [EMAIL PROTECTED] Anyone know how I can correct that? (I posted a question on the vim mailing list, waiting for an answer) If you want to give it a try, more info and download available at http://www.raphinou.com/vim-radiant Raph -- Web database: http://www.myowndb.com Free Software Developers Meeting: http://www.fosdem.org ___ Radiant mailing list Post: Radiant@lists.radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant Suh-weet! Farrel ___ Radiant mailing list Post: Radiant@lists.radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Redirect?
On 28/01/07, Anton J Aylward [EMAIL PROTECTED] wrote: Is there a way to set up a page so that it silently redirects to another one Something that results in what one might conceive of as r:redirect dest=/about/faq / with appropriate 404 handling? -- An NSA-employed acquaintance, when asked whether the government can crack DES traffic, quipped that real systems are so insecure that they never need to bother. Unfortunately, there are no easy recipes for making a system secure, no substitute for careful design and critical, ongoing scrutiny. -- Matt Blaze in AC2 ___ Radiant mailing list Post: Radiant@lists.radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant I set up a layout called 'Redirect' that has the following template: html headMETA HTTP-EQUIV=refresh CONTENT=0;URL=r:content / //head /html Then if I have a page I want to redirect elsewhere I just give it the 'Redirect' layout and put the url I want to redirect to in the body. ___ Radiant mailing list Post: Radiant@lists.radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
[Radiant] Markaby Filter for Radiant
Hi folks, After some scratching around in the source for Markaby I think I've finally cobbled together a Markaby filter for Radiant that works in a decent manner. The following Markaby code h1 {r.title!} p do text(Today's date is ) r.date! br text(You are ) r.author! end p do r.random do r.option snap r.option crackle r.option pop end end r.snippet :name=contact_details p do r.navigation :urls=Home: /;Projects: /projects;About Us: /about do r.normal{a(:href=r:url/){r.title!}} r.between :: r.here{em{r.title!}} end end gets transformed into the following (tidied up) HTML: h1Markaby Example/h1 pToday's date is Wednesday, August 02, 2006br/ You are Administrator/p psnap/p p15 Main Stbr/ Anytownbr/ USA/p p emHome/em:: a href=/projectsProjects/a:: a href=/aboutAbout Us/a /p There are a few things to be aware of when using the filter. Because of the dynamic nature of Radiant's tags and the fact new ones could be defined depending on the behaviour of the page in certain cases we need to explicitly indicate that the tag is 'finished'. In cases where a tag takes an argument or block (like 'r.between ::' or 'r.random do...end') this is deduced automatically but in cases where it isn't, for instance if you just want to generate 'r:date/' then you need to either give an empty argument (r.date ) or use the much more elegant r.date! (which I strongly suggest). Another thing is that because tags are generated in the order that they are executed 'a :href=r.url' will not generate correct html because the 'r.ur'l will be evaluated before the 'a'. In this case you're going to have to use 'a :href=r:url/'. This seems to be the only type of case where this seems to pop up so I hope it isn't a major nuisance. The filter also has the 'r' radius tag prefix hardcoded so hopefully this won't change in the future. Is the tag prefix avaiable in some constant? One more note is that the filter swaps the order in which the filter and radius parser work. Hopefully that doesn't kill other filters. A very big disclaimer I have not tested this beyond my own simple tests so I would not suggest you use it in a production system. I appreciate any suggestions or bugfixes that would help it work better. Farrel markaby_filter.rb Description: Binary data ___ Radiant mailing list Radiant@lists.radiantcms.org http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Trunk broken
On 31/07/06, Farrel Lifson [EMAIL PROTECTED] wrote: I just checked out the latest version from svn but it seems to be broken. After setting up my databases using the scripts I go to http://localhost:3000/admin and login but then immediately the following error occurs. Should I rather be developing against 0.5? Farrel Is the latest version of radiant from svn broken for anyone else? Or is it just me? Farrel ___ Radiant mailing list Radiant@lists.radiantcms.org http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Markaby
On 26/07/06, Caylan Van Larson [EMAIL PROTECTED] wrote: What's the possibility of having a markaby filter, or markaby in the layouts? I've been experimenting around today trying to get markaby working as a filter. I've run into a number of problems though so I'm putting it out to the mailing list to see if someone can improve it. Firstly it seems Ruby syntax can only handle simple radius tags without parameters. So a simple tag like h2{r:date} works but a tag like r:link(:url=http://localhost/;) does not, although r:link do test(link) end does work. Also it doesn't seem to like the {} block delimeters so r:random { r:option {text(random1)} r:oprion {text(random2)} } won't parse but r:random do r:option do;text(random1);end r:option do;text(random2);end end works. Anyway here's the code for the filter I was using. I had to redefine parse_object and change the order of filtering and parsing by radius, hopefully that doesn't cause problems with other filters. require 'markaby' class Behavior::Base def parse_object(object) text = object.content text = object.filter.filter(text) if object.respond_to? :filter_id text = parse(text) text end end class MarkabyFilter TextFilter::Base register 'Markaby' def filter(text) Markaby::Template.new(text).render+ end end Farrel ___ Radiant mailing list Radiant@lists.radiantcms.org http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] SVN down?
On 20/07/06, John W. Long [EMAIL PROTECTED] wrote: I just did a full check out so everything should be fine. A firewall on your network may be blocking access to the site for some reason. Can you use a Web browser to go to the URL? http://dev.radiantcms.org/svn/radiant/trunk/ If so you should be able to do this: svn co http://dev.radiantcms.org/svn/radiant/trunk/ I can access the site with my browser. I'll investigate if it's perhaps a problem on my side. My ADSL provider shapes traffic like crazy so it could be that although it shouldn't kill connections. Farrel ___ Radiant mailing list Radiant@lists.radiantcms.org http://lists.radiantcms.org/mailman/listinfo/radiant