Christian, this is true -- sortof. I recently submitted some patches to Sean that have been rolled into shared_layouts. One of these changes now lets you create a sub-page within Radiant like Vincent describes. If you fail to create a sub-page, then the old behavior -- the one you described -- prevails. This way you can use the sub-page's breadcrumbs, title, and, page parts.

This is also why I wanted to know if Vincent was using this latest version of shared_layouts.
Vincent, try pulling the latest version and see if it fixes things for you.

-Chris

Christian Vetter wrote:
Hi Vincent,
I've been using Radiant for just a few days now, but I recall reading something 
about inheriting content from parent pages through the page parts. If I get 
your descriptions right, _part_ of the content from /projects is rendered in 
subpages, so I guess that might indeed result from said feature. I'd have liked 
to look it up for you, but I'm in a bit of a hurry.

Hope this helps
Chris


-------- Original-Nachricht --------
Date: Mon, 15 Dec 2008 23:43:30 +0100
From: Vincent P?r?s <vincent.pe...@gmail.com>
Subject: [Radiant] Re: Use sub folder url with share_layouts
To: radi...@lists.radiantcms.org
Message-ID: <109dc91b76c297446aee72eab001b...@ruby-forum.com>
Content-Type: text/plain; charset=utf-8

Hello, thanks ! I will give you more informations :

I created two pages :
Projects => /projects (with body content 'Here is Projects')
  Create => /projects/new (with body content 'Here is new project')

Then, I created a new extension with the following routes :
map.with_options(:controller => 'projects') do |project|
  project.project_index    '/projects', :action => 'index'
  project.project_new      '/project/new', :action => 'new'
end

The controller project is a simple controller like that :
class ProjectsController < ApplicationController
  radiant_layout ''
  skip_before_filter :verify_authenticity_token
  no_login_required

  def index

  end
  def new

  end
end

In the two view, I have something like :
- content_for :extension do
  content for project...

- content_for :extension do
  content for new project...

Back to the backend, I'm using a layout which include parts 'body' and 'extension'.

Now with share_layouts this is my result :

/projects
Here is Projects
content for project...

/projects/new
Here is Projects
content for new project...

The way is normal for the first link, but the page content of the second come from the first one.
Let me know if you need more informations.
I'm not using fancy extension except the vhost extension (for multi site).

Thanks !
Vincent
_______________________________________________
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

Reply via email to