Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

Snippets Plugin (See related posts)

Coding to use for the Expression Engine Snippets Plugin:

In the actual pages:
{exp:snippets template="static/index"}
{page_title}Site: {title}{/page_title}
{page_section}journal{/page_section}
{/exp:snippets}


In the header include (static/index in this case):
%page_title%
%page_section%

$fof_title="%nl_title%";
$fof_section="%nl_section%";
?>


Define them as variables in PHP for easy if/else statements. :)

Comments on this post

jtnt posts on Aug 21, 2006 at 21:06
Snippets, it appears, no longer works with EE. No matter, though, because EE allows variables to be passed to templates itself now.

{embed="includes/mainnav" some_variable="variable_value"}


And you get at that info a la the below in the included template:

{embed:some_variable}
jtnt posts on Aug 21, 2006 at 21:06
Snippets, it appears, no longer works with EE. No matter, though, because EE allows variables to be passed to templates itself now.

{embed="includes/mainnav" some_variable="variable_value"}


And you get at that info a la the below in the included template:

{embed:some_variable}

You need to create an account or log in to post comments to this site.


Related Posts