librelist archives

« back to archive

Theme Error

Theme Error

From:
Marc Stein
Date:
2015-07-08 @ 15:14
Hi,

Just started using Nesta, so if this is a blazingly obvious thing, I
apologize in advance.

When I install the demo site I can make modifications, add content, etc and
everything works great.

If I install a new template and then change the template in the config I
receive the following error:

Nesta::HeadingNotSet at /
/ needs a heading
file: models.rb
location: heading
line: 231

It doesn't matter which template I try (slate, zurb, etc)

I did look at models.rb but the issue isn't really obvious to me.

Thanks in advance,

Marc

Re: [nesta] Theme Error

From:
Graham Ashton
Date:
2015-07-09 @ 15:56
On Wednesday 08 July, Marc Stein wrote:

> When I install the demo site I can make modifications, add content, etc and
> everything works great.
> 
> If I install a new template and then change the template in the config I
> receive the following error:
> 
> Nesta::HeadingNotSet at /

Hi Marc. Apologies - the themes need a quick update to support a 
(relatively) new feature in Nesta.

Historically, Nesta required every page to have a heading, and themes 
could be written to assume that the heading would always be there.

We then made it possible to write pages without headings. A site's home 
page is a good example of when this might make sense, and indeed, the demo
site's home page doesn't have a heading.

You'll be able to work around it by changing content/pages/index.haml, and
adding an h1 tag at the top of it. Nesta looks for an h1 tag at the top of
a page to determine what the heading is.

I'm just updating the slate and postal3 themes (which I wrote) this evening.

Cheers,
Graham

Re: [nesta] Theme Error

From:
Marc Stein
Date:
2015-07-09 @ 19:52
Hi Graham,

Thanks so much! That did the trick.

Great job on the project!

Best,

Marc

On Thu, Jul 9, 2015 at 11:56 AM, Graham Ashton <graham@effectif.com> wrote:

> On Wednesday 08 July, Marc Stein wrote:
>
> > When I install the demo site I can make modifications, add content, etc
> and
> > everything works great.
> >
> > If I install a new template and then change the template in the config I
> > receive the following error:
> >
> > Nesta::HeadingNotSet at /
>
> Hi Marc. Apologies - the themes need a quick update to support a
> (relatively) new feature in Nesta.
>
> Historically, Nesta required every page to have a heading, and themes
> could be written to assume that the heading would always be there.
>
> We then made it possible to write pages without headings. A site's home
> page is a good example of when this might make sense, and indeed, the demo
> site's home page doesn't have a heading.
>
> You'll be able to work around it by changing content/pages/index.haml, and
> adding an h1 tag at the top of it. Nesta looks for an h1 tag at the top of
> a page to determine what the heading is.
>
> I'm just updating the slate and postal3 themes (which I wrote) this
> evening.
>
> Cheers,
> Graham
>