Skip to content

A Twig extension that allows you to integrate Perch CMS into your templates.

Notifications You must be signed in to change notification settings

MattLocke/twig-perch-extension

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Twig Perch Extension

Adding the extension

First you need to register the extension by adding the following line to your application.

$twig->addExtension(new Twig_Extension_Perch());

Using the extension

Now to use the Perch Extension in your templates you first need to call the runtime using…

{{ perchRuntime() }}

Then add the following code in your template where you would like Perch content to show.

{{ perchContent('Intro') }}

Replace intro with whatever you want your region to be called.

About

A Twig extension that allows you to integrate Perch CMS into your templates.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published