[Radiant] automated page building

Daniel Sheppard daniels at thegroggysquirrel.com
Wed May 16 03:09:53 CDT 2007


child.parts should be an array 

> -----Original Message-----
> From: radiant-bounces at lists.radiantcms.org 
> [mailto:radiant-bounces at lists.radiantcms.org] On Behalf Of 
> Saji Njarackalazhikam Hameed
> Sent: Wednesday, 16 May 2007 4:57 PM
> To: radiant at lists.radiantcms.org
> Subject: Re: [Radiant] automated page building
> 
> Sean,
> 
> Thanks..
> 
> With the URL now enclosed by quotes, I get the following 
> error ...hmmm.
> what could i be doing wrong? 
> 
> saji
> 
> # Start of Ruby code
> #require 'config/environment' ! i commented this out
> 
> parent = Page.find_by_url("/articles/")
> 
> i=1
> child = Page.new
> child.parent = parent
> child.title = "Page #{i}"
> child.breadcrumb = "Page #{i}"
> child.slug = "page-#{i}"
> body = PagePart.new
> body.content = "This is page #{i}"
> child.parts = body
> child.save!



More information about the Radiant mailing list