Forum: Radiant CMS default options

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
David Minor (Guest)
on 2007-02-21 16:24
(Received via mailing list)
Are there really only 4 available config params to set in radiant?
from app/models/radiant/config.rb:
   # admin.title    :: the title of the admin system
   # admin.subtitle :: the subtitle of the admin system
   # default.parts  :: a comma separated list of default page parts
   # dev.host       :: the hostname where draft pages are viewable

I'm looking for a way to set the default published status of a page
on creation (while I'm rapidly adding content).

Also, I assume there is no way to preview a page in draft status in
the site layout?

Thanks,
dm
Jamie M. Wilkinson (Guest)
on 2007-02-21 17:06
(Received via mailing list)
> Also, I assume there is no way to preview a page in draft status in
> the site layout?

<r:children:each status="any">
...
</r:children:each>

-jamie
John W. Long (Guest)
on 2007-02-22 05:21
(Received via mailing list)
David Minor wrote:
> Are there really only 4 available config params to set in radiant?

Yes.

> I'm looking for a way to set the default published status of a page
> on creation (while I'm rapidly adding content).

There isn't a way to do this right now, though I admit this is annoying
especially during the site creation phase. I'm open to the idea of
adding a config value for this.

> Also, I assume there is no way to preview a page in draft status in
> the site layout?

Nope. Not unless you use the facets branch with the page preview
extension.

--
John L.
http://wiseheartdesign.com
Jacob B. (Guest)
on 2007-02-22 06:09
You can also disable caching permanently by modifying the show_page
method of the SiteController

  def show_page
    response.headers.delete('Cache-Control')
    url = params[:url].to_s
    show_uncached_page(url)
  end

I recommend leaving the original code for show_page there and commented
out, and making sure you put it back to normal when you go to a
production environment.
Jacob B. (Guest)
on 2007-02-22 06:11
Jacob B. wrote:
>   def show_page
>     response.headers.delete('Cache-Control')
>     url = params[:url].to_s
>     show_uncached_page(url)
>   end

This will also show pages that have "Draft" status.
John W. Long (Guest)
on 2007-02-22 17:28
(Received via mailing list)
John W. Long wrote:
> There isn't a way to do this right now, though I admit this is annoying
> especially during the site creation phase. I'm open to the idea of
> adding a config value for this.

This is now implemented in mental:

http://dev.radiantcms.org/radiant/changeset/343

Now you can do the following from script/console:

 >> Radiant::Config['defaults.page.status'] = 'published'

And by default new pages will be created with the published status.

Also note that 'default.parts' has been renamed 'defaults.page.parts'.
The new list of keys is:

admin.title          : the title of the admin system
admin.subtitle       : the subtitle of the admin system
defaults.page.parts  : a comma separated list of default page parts
defaults.page.status : a string representation of the default status
dev.host             : the hostname where draft pages are viewable

--
John L.
http://wiseheartdesign.com
Jamie M. Wilkinson (Guest)
on 2007-02-22 18:53
(Received via mailing list)
> dev.host             : the hostname where draft pages are viewable

Interesting! Does this require use of the 'multiple domain names'
extension?
-jamie
David Minor (Guest)
on 2007-02-23 04:07
(Received via mailing list)
On Feb 21, 2007, at 9:20 PM, John W. Long wrote:


>
>
>> Also, I assume there is no way to preview a page in draft status in
>> the site layout?
>>
>
> Nope. Not unless you use the facets branch with the page preview
> extension.
>

John,

so what does the dev.host config option do?

Thanks for adding the new config option for status.

dm
John W. Long (Guest)
on 2007-02-23 17:37
(Received via mailing list)
David Minor wrote:
> so what does the dev.host config option do?

It allows you to preview "draft" pages:

http://dev.radiantcms.org/radiant/wiki/HowToDevAndProduction


--
John L.
http://wiseheartdesign.com
This topic is locked and can not be replied to.