Forum: Radiant CMS Reusable Page Parts - With A Twist

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.
9d170533016cbe367f86a6d99437e3cf?d=identicon&s=25 Chris Parrish (Guest)
on 2007-01-29 01:30
Before I ask my question, I'd like to make it clear that I am new to
Radiant -- perhaps I am asking this the wrong way or maybe there's
already a posted solution that I missed.  If so, I apologize in advance.

I also realize that what I'm trying to do isn't typical and that Radiant
is not intended to be a swiss army knife to solve every problem.  The
abstraction of my problem, however, is something that could be
needed/useful elsewhere.

Here goes...

I have two "interfaces" to my site -- one that is the typical,
open-to-the-public site with content on various subjects.  The other
"side" has its own stylesheets, unique content and is password
protected.

The catch is that some of the content is not unique and is used in both
places.  To make it more complicated, these pages don't match up in a
1:1 correlation.  Instead, parts of each page are what's duplicated.
For instance:

  Site Side 1, Page 1 (Page 1.1)
    * Unique Content (intro)
    * Page Part A
    * Page Part B
    * Unique Content (ending)

  Site Side 2, Page 1 (Page 2.1)
    * Unique Content (different intro)
    * Page Part A

  Site Side 2, Page 2 (Page 2.2)
    * Unique Content (another intro)
    * Page Part B
    * Unique Content (another ending)

Ideally, I would store the content for the common page parts (in this
example Parts A and B) in their own location (maybe as hidden pages?)
and then reference them in the actual pages (in this example, Pages 1.1,
2.1, & 2.2)

The purpose, of course, is to keep this content DRY and to make it easy
for future writers to follow the structure and methods used (so putting
the parts A & B inside Page 1.1 and referencing them from 2.1 and 2.2
would obscure it somewhat).

In many ways, this sounds to me like the debates I've read about storing
and reusing resources within pages.  Essentially, my page parts are just
resources of a different flavor.

Wishlist:  Just as with a resource solution, it would be nice to have
some admin interface to confirm that the page part (or resource) is
actually being used somewhere.  Better yet -- I would love some sort of
itemization showing each usage of the page part (or resource).

Thanks for your help, suggestions, and guidance.  This problem is my
main concern at the moment before moving my site to Radiant.
Dc893f8ae12045dc71048a0c6a56fc01?d=identicon&s=25 Jacob Burkhart (igotimac)
on 2007-01-30 04:20
So, basically you're just looking for a bunch of debug output below the
page part tabs about what's being used where?

It's not really a functional change, just some information to help you
setup your site the way you describe, right?
9d170533016cbe367f86a6d99437e3cf?d=identicon&s=25 Chris Parrish (Guest)
on 2007-01-30 05:57
Actually, I only need one thing:

Some way to reuse a page part within other pages (I'm not sure if I'm
using the right term -- I haven't played with Radiant enough to say I
really understand "page parts").  I don't know if this is do-able with
Radiant.  If so, I'm not sure if it can be done using page parts, hidden
pages referenced within visible ones, or some other device.

If anyone can tell me an easy way to do this, you're my hero.

That said, a nice addition would be to collect and organize data on the
usage of these sub-elements.  This is not really a need -- but would fit
common use cases:

1.  Writer modifies the visible pages and no longer uses sub-element A.
A report/view/alert/whatever alerts him of this so he knows it is safe
to delete it.

2.  Writer re-organizes sub-element A and so checks all the visible
pages that depend on it (maybe changing their unique content to dovetail
with the newly modified sub-element text).
9d170533016cbe367f86a6d99437e3cf?d=identicon&s=25 Chris Parrish (Guest)
on 2007-01-30 06:18
By the way, this problem sounds an awful lot like the whole resources
thing to me.  Sure, in many cases a resource is only used once and can
be "attached" to that page.  But in other cases, say with a logo or
other commonly used element, the resource belongs more to the site than
any one page - just like a style sheet.

When I think about the resource/attachment problem, I see:

Primary Issue - Who/What owns the resource (or in my case the
sub-element) and how do you reference it from multiple pages.

Secondary Issue - How can you find out where (or if) the resource is
being used (for cleanup and maintenance reasons).

Just my $0.02 -- hope it helps how the whole resource problem is
approached.  As I said in my original post, my problem here is really
common when abstracted.

I only need the Primary Issue solved for now, though.
D9ff9c1eba9a908e3454d414b61f874f?d=identicon&s=25 Kevin Ansfield (b0rdslide)
on 2007-01-30 13:09
(Received via mailing list)
Hi Chris,

If you're trying to do what I think you're are then it should just be a
case
of using the radius tags...

<r:find url="section/page-name">
  <r:content part="part-name" />
</r:find>

That will pull the page-part you specify out of the page that you
selected
with the find tag. Does that help at all?

Kev
9d170533016cbe367f86a6d99437e3cf?d=identicon&s=25 Chris Parrish (Guest)
on 2007-01-30 17:56
Kevin Ansfield wrote:
> If you're trying to do what I think you're are then it should just be a
> case of using the radius tags...
>
> <r:find url="section/page-name">
>   <r:content part="part-name" />
> </r:find>
>
> That will pull the page-part you specify out of the page that you
> selected with the find tag. Does that help at all?

Thanks Kev - not sure how I missed that one.
This topic is locked and can not be replied to.