include_view: Template function to include 'snippets' in the view folder

View source: R/render.R

include_viewR Documentation

Template function to include 'snippets' in the view folder

Description

Store the reusing 'HTML' segments in the views folder. This function should be used in the 'index.html' template

Usage

include_view(file, ..., .env = parent.frame(), .root_path = template_root())

Arguments

file

files in the template views folder

...

ignored

.env, .root_path

internally used

Value

rendered 'HTML' segments

Examples

## Not run: 
# in your 'index.html' file
<html>
<header>
{{ shidashi::include_view("header.html") }}
</header>
<body>

</body>
<!-- Before closing html tag -->
{{ shidashi::include_view("footer.html") }}
</html>

## End(Not run)

shidashi documentation built on June 21, 2022, 5:05 p.m.