librelist archives

« back to archive

Slim Templates

Slim Templates

From:
Joe Meenen
Date:
2012-08-17 @ 10:03
Hello

I tried to follow the article 'Templating engines' on nestacms. I copied 
the routes form the gem to my app.rb file. I changed the routes to use the
Slim engine instead of the Haml engine. But when I try to render a slim 
file in content/pages the slim file cannot be found. The splat rout gets a
nil page when it tries to find the file. 

Inline rendering like

slim "h1 Slim is here"

works fine. 

Is there anything else I need to change so my slim template files can be 
found by Nesta::Page.find_by_path ?

Thanks for your help. 
Joe

Re: [nesta] Slim Templates

From:
Graham Ashton
Date:
2012-08-17 @ 10:08
On 17 Aug 2012, at 11:03, Joe Meenen wrote:

> Hello
> 
> I tried to follow the article 'Templating engines' on nestacms. I copied
the routes form the gem to my app.rb file. I changed the routes to use the
Slim engine instead of the Haml engine. But when I try to render a slim 
file in content/pages the slim file cannot be found. The splat rout gets a
nil page when it tries to find the file.

Hi Joe. The template docs are talking about the types of templates that 
you can use in the views folder. At the moment only markdown, textile and 
Haml are supported in content/pages.

Nathanael has a branch that looks like it might address the kind of thing 
you're after. Have a look at issue 114.

https://github.com/gma/nesta/pull/114

Cheers,
Graham

--
Graham Ashton
Founder, The Agile Planner
http://theagileplanner.com | @agileplanner | @grahamashton


Re: [nesta] Slim Templates

From:
Jörg Meenen
Date:
2012-08-17 @ 11:31
Thanks for the quick response Graham. 

And thanks for Nesta. It is great. 

Am 17.08.2012 um 12:08 schrieb Graham Ashton <graham@effectif.com>:

> On 17 Aug 2012, at 11:03, Joe Meenen wrote:
> 
>> Hello
>> 
>> I tried to follow the article 'Templating engines' on nestacms. I 
copied the routes form the gem to my app.rb file. I changed the routes to 
use the Slim engine instead of the Haml engine. But when I try to render a
slim file in content/pages the slim file cannot be found. The splat rout 
gets a nil page when it tries to find the file.
> 
> Hi Joe. The template docs are talking about the types of templates that 
you can use in the views folder. At the moment only markdown, textile and 
Haml are supported in content/pages.
> 
> Nathanael has a branch that looks like it might address the kind of 
thing you're after. Have a look at issue 114.
> 
> https://github.com/gma/nesta/pull/114
> 
> Cheers,
> Graham
> 
> --
> Graham Ashton
> Founder, The Agile Planner
> http://theagileplanner.com | @agileplanner | @grahamashton
> 
> 
>