Google Groups Home
Help | Sign in
Generating the page header <head></head> data
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
bretweinraub  
View profile
 More options May 12, 2:45 pm
From: bretweinraub <bretweinr...@gmail.com>
Date: Mon, 12 May 2008 11:45:00 -0700 (PDT)
Subject: Generating the page header <head></head> data
I'd like to be able to generate a correct  <head></head> section for
my comatose pages.

This means within the <head> section, the following:

<title></title>
<meta description=""/>
<meta keywords=""/>

I have a keywords and a title section in the admin interface (and
these do indeed update the database),
but they don't actual render into the html.

Is that the expected behavior?

If it is, any pointers to where I would be looking to implement a
patch for this?

Thanks,
Bret


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thibaut Barrère  
View profile
 More options May 12, 3:10 pm
From: "Thibaut Barrère" <thibaut.barr...@gmail.com>
Date: Mon, 12 May 2008 21:10:31 +0200
Local: Mon, May 12 2008 3:10 pm
Subject: Re: [comatose-plugin] Generating the page header <head></head> data

> Is that the expected behavior?

Are you using a customized layout for the comatose public controller? (under
app/views/layouts/application.rhtml for instance in my case)

If you do so, you can write:

    <meta name="Keywords" content="<%= @page.keywords rescue ''%>"/>
    <title><%= @page.title rescue '' %></title>

hth

-- Thibaut


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
bretweinraub  
View profile
 More options May 12, 3:16 pm
From: bretweinraub <bretweinr...@gmail.com>
Date: Mon, 12 May 2008 12:16:30 -0700 (PDT)
Local: Mon, May 12 2008 3:16 pm
Subject: Re: Generating the page header <head></head> data
I am.

That looks like it work great.  I think I still need to patch comatose
for "meta description" though?

This is much better than what I just did, which was the following in
my page:

<script language="JavaScript">
 document.title='{{ page.title }}'
</script>

Although that did work.....

Thanks,
Bret

On May 12, 1:10 pm, "Thibaut Barrère" <thibaut.barr...@gmail.com>
wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thibaut Barrère  
View profile
 More options May 12, 3:33 pm
From: "Thibaut Barrère" <thibaut.barr...@gmail.com>
Date: Mon, 12 May 2008 21:33:22 +0200
Local: Mon, May 12 2008 3:33 pm
Subject: Re: [comatose-plugin] Re: Generating the page header <head></head> data

> That looks like it work great.  I think I still need to patch comatose
> for "meta description" though?

Glad it works for you. I believe meta description is not available in the
built-in stuff. Two suggestions though:
- you add a custom meta-description column on the page, and hack the admin
part to support this
- you generate the meta description based on the content (like :
@page.body.truncate... or something like that, if appliable)

cheers

-- Thibaut


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Vrensk  
View profile
(1 user)  More options May 13, 3:51 am
From: "David Vrensk" <dvre...@gmail.com>
Date: Tue, 13 May 2008 09:51:27 +0200
Local: Tues, May 13 2008 3:51 am
Subject: Re: [comatose-plugin] Re: Generating the page header <head></head> data

On 5/12/08, Thibaut Barrère <thibaut.barr...@gmail.com> wrote:

> That looks like it work great.  I think I still need to patch comatose
> > for "meta description" though?

> Glad it works for you. I believe meta description is not available in the
> built-in stuff. Two suggestions though:
> - you add a custom meta-description column on the page, and hack the admin
> part to support this
> - you generate the meta description based on the content (like :
> @page.body.truncate... or something like that, if appliable)

A third suggestion: add a vertical bar and your description string to the
keywords field and then do this:

<%   keywords, description = @page.keywords.split('|') -%>
  <meta name="Keywords" content="<%= keywords %>" />
  <meta name="description" content="<%= description %>" />

Simple as that.

HTH,

/David

PS. Thibaut, I will try to find time to revisit that bug that you want
closed.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bret Weinraub  
View profile
 More options May 13, 12:31 pm
From: "Bret Weinraub" <bretweinr...@gmail.com>
Date: Tue, 13 May 2008 10:31:33 -0600
Local: Tues, May 13 2008 12:31 pm
Subject: Re: [comatose-plugin] Re: Generating the page header <head></head> data

Clever .....

I can think of a few uses for that.

Thanks!


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google