[Radiant] Another question - Entering metadata
Nathan Wright
nathan.e.wright at gmail.com
Tue Aug 29 16:17:14 CDT 2006
There's really only 2 files that you need to change:
script/setup_database (or add the two new columns to your existing
database) and app/views/admin/page/new.rhtml . See the attached files
if you're feeling lazy.
--- script/setup_database
@@ -141,6 +141,8 @@
t.column "created_by", :integer
t.column "updated_by", :integer
t.column "virtual", :boolean, :default => false, :null => false
+ t.column "keywords", :text
+ t.column "description", :text
end
--- app/views/admin/page/new.rhtml
@@ -75,6 +75,14 @@
<td><label for="page_breadcrumb">Breadcrumb</label></td>
<td class="field"><%= text_field "page", "breadcrumb",
:class => 'textbox', :maxlength => 160 %></td>
</tr>
+ <tr>
+ <td><label for="page_keywords">Keywords</label></td>
+ <td class="field"><%= text_area "page", "keywords", :style
=> 'width: 100%; height: 5em;' %></td>
+ </tr>
+ <tr>
+ <td><label for="page_description">Description</label></td>
+ <td class="field"><%= text_area "page", "description",
:style => 'width: 100%; height: 5em;' %></td>
+ </tr>
</table>
<script type="text/javascript">
// <![CDATA[
Hope that helps!
On 8/29/06, Jake Liddell <jake at fourhats.com> wrote:
> I think you and Sean are right - but I'd be very interested in the diff
> anyway, just in case I need it in the future.
>
> Thanks for the help.
> Jake.
>
> -----Original Message-----
> From: radiant-bounces at lists.radiantcms.org
> [mailto:radiant-bounces at lists.radiantcms.org] On Behalf Of Nathan Wright
> Sent: 29 August 2006 15:12
> To: radiant at lists.radiantcms.org
> Subject: Re: [Radiant] Another question - Entering metadata
>
> I agree with Sean on this, but if you *really* want to insert them
> into the "more" section it's pretty easy to get this setup. I did it
> for a client when I thought the concept of adding page parts might be
> a little too difficult for them. Let me know and I'll see if I can
> work up a diff for you.
>
> On 8/29/06, Sean Cribbs <seancribbs at gmail.com> wrote:
> > Jake,
> >
> > You're probably better off creating page parts for each of those metadata
> > items, and then again using the <r:content .../> tag to insert their
> values
> > into your template. The "more" link/dropdown is primarily for
> > system-specific-and-critical stuff, whereas page metadata like keywords
> and
> > descriptions are really content.
> >
> > Sean Cribbs
> > seancribbs.com
> >
> >
> > On 8/29/06, Jake Liddell <jake at fourhats.com > wrote:
> > >
> > >
> > >
> > >
> > >
> > >
> > > Hi all,
> > >
> > >
> > >
> > > Another question that I'm sure people will want to do if they're
> creating
> > commercial sites with Radiant:
> > >
> > >
> > >
> > > When I click on the "More" link on a standard edit page, I can change
> the
> > slug and the breadcrumb. I would also like to enter a description and
> > keywords – these would then get included into my header as metadata for
> the
> > page – at the moment I have to just define the header for the whole site
> (or
> > have multiple header snippets for site sections), but if I want to give
> > myself every chance of being found on the search engines for the right
> > things, I need to customize on a per-page level.
> > >
> > >
> > >
> > > Anyone else want to do this? If people were interested, this could be
> an
> > enhancement? If someone was prepared to point me in the right direction,
> > I'd have a go myself when I have the time.
> > >
> > >
> > >
> > > (On a separate, more trivial note, it would be nice to have the 'More'
> > expanded by default, to remind people to fill the boxes in – it would also
> > be nice to make the boxes mandatory, so you can't save a new page without
> > them – otherwise authors are always going to forget at some point.)
> > >
> > >
> > >
> > >
> > >
> > > Cheers,
> > >
> > > Jake.
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > No virus found in this outgoing message.
> > > Checked by AVG Free Edition.
> > > Version: 7.1.405 / Virus Database: 268.11.6/428 - Release Date:
> 25/08/2006
> > >
> > >
> > > _______________________________________________
> > > Radiant mailing list
> > > Radiant at lists.radiantcms.org
> > > http://lists.radiantcms.org/mailman/listinfo/radiant
> > >
> > >
> > >
> >
> >
> > _______________________________________________
> > Radiant mailing list
> > Radiant at lists.radiantcms.org
> > http://lists.radiantcms.org/mailman/listinfo/radiant
> >
> >
> >
>
>
> --
> Nathan
> _______________________________________________
> Radiant mailing list
> Radiant at lists.radiantcms.org
> http://lists.radiantcms.org/mailman/listinfo/radiant
>
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.405 / Virus Database: 268.11.6/430 - Release Date: 28/08/2006
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.1.405 / Virus Database: 268.11.6/430 - Release Date: 28/08/2006
>
>
> _______________________________________________
> Radiant mailing list
> Radiant at lists.radiantcms.org
> http://lists.radiantcms.org/mailman/listinfo/radiant
>
--
Nathan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: setup_database
Type: application/octet-stream
Size: 8563 bytes
Desc: not available
Url : http://lists.radiantcms.org/pipermail/radiant/attachments/20060829/d5a31e02/setup_database.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: new.rhtml
Type: application/octet-stream
Size: 6518 bytes
Desc: not available
Url : http://lists.radiantcms.org/pipermail/radiant/attachments/20060829/d5a31e02/new.obj
More information about the Radiant
mailing list