Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Using html/template with plush file.tmpl.html not working as designed #2004

Closed
ghost opened this issue Jun 8, 2020 · 2 comments
Closed

Using html/template with plush file.tmpl.html not working as designed #2004

ghost opened this issue Jun 8, 2020 · 2 comments
Labels

Comments

@ghost
Copy link

ghost commented Jun 8, 2020

Description

On your template engines page you say:

For example, if the file was foo.tmpl.html it would, by default, first be processed as a Go template, then that result would be sent to the Plush engine.

The html/template if statement doesn't end up being processed. In theory, from the above quote, it should process it first. So I'm a bit confused how to use plush and html/template together.

Steps to Reproduce the Problem

render.go

func init() {
	r = render.New(render.Options{
		// HTML layout to be used for all HTML requests:
		HTMLLayout: "layout.html",

layout.html

 <%= partial("navigation/links.tmpl.html") %>

navigation/_links.tmpl.html

<a {{if eq .current_path "/operations/"}} class="active" {{end}} href="/operations">Operations</a>

Expected Behavior

The html/template should be processed.

Actual Behavior

It just shows the html/template plain text.

Info

Please run buffalo info and paste the information below where it says "PASTE_HERE".

-> Go: Checking installation
✓ The `go` executable was found on your system at: /usr/local/bin/go

-> Go: Checking minimum version requirements
✓ Your version of Go, 1.14.3, meets the minimum requirements.

-> Go: Checking Package Management
✓ You are using Go Modules (`go`) for package management.

-> Go: Checking PATH
✓ Your PATH contains /Users/bgold0/go/bin.

-> Node: Checking installation
✓ The `node` executable was found on your system at: /Users/bgold0/.nvm/versions/node/v10.16.0/bin/node

-> Node: Checking minimum version requirements
✓ Your version of Node, v10.16.0, meets the minimum requirements.

-> NPM: Checking installation
✓ The `npm` executable was found on your system at: /Users/bgold0/.nvm/versions/node/v10.16.0/bin/npm

-> NPM: Checking minimum version requirements
✓ Your version of NPM, 6.9.0, meets the minimum requirements.

-> Yarn: Checking installation
✓ The `yarnpkg` executable was found on your system at: /usr/local/bin/yarnpkg

-> Yarn: Checking minimum version requirements
✓ Your version of Yarn, 1.22.4, meets the minimum requirements.

-> PostgreSQL: Checking installation
✘ The `postgres` executable could not be found on your system.
For help setting up your Postgres environment please follow the instructions for you platform at:

https://www.postgresql.org/download/

-> MySQL: Checking installation
✘ The `mysql` executable could not be found on your system.
For help setting up your MySQL environment please follow the instructions for you platform at:

https://www.mysql.com/downloads/

-> SQLite3: Checking installation
✓ The `sqlite3` executable was found on your system at: /usr/bin/sqlite3

-> SQLite3: Checking minimum version requirements
✓ Your version of SQLite3, 3.28.0, meets the minimum requirements.

-> Cockroach: Checking installation
✘ The `cockroach` executable could not be found on your system.
For help setting up your Cockroach environment please follow the instructions for you platform at:

https://www.cockroachlabs.com/docs/stable/

-> Buffalo (CLI): Checking installation
✓ The `buffalo` executable was found on your system at: /usr/local/bin/buffalo

-> Buffalo (CLI): Checking minimum version requirements
✓ Your version of Buffalo (CLI), v0.16.9, meets the minimum requirements.

-> Buffalo: Application Details
Pwd         /Users/bgold0/webapp
Root        /Users/bgold0/webapp
GoPath      /Users/bgold0/go
PackagePkg  coke
ActionsPkg  coke/actions
ModelsPkg   coke/models
GriftsPkg   coke/grifts
WithModules true
Name        coke
Bin         bin/coke
VCS         git
WithPop     false
WithSQLite  false
WithDep     false
WithWebpack true
WithNodeJs  true
WithYarn    false
WithDocker  true
WithGrifts  true
AsWeb       true
AsAPI       false
InApp       true

-> Buffalo: config/buffalo-app.toml
name = "coke"
bin = "bin/coke"
vcs = "git"
with_pop = false
with_sqlite = false
with_dep = false
with_webpack = true
with_nodejs = true
with_yarn = false
with_docker = true
with_grifts = true
as_web = true
as_api = false

-> Buffalo: config/buffalo-plugins.toml

-> Buffalo: go.mod
module coke

go 1.14

require (
        github.com/gobuffalo/buffalo v0.16.9
        github.com/gobuffalo/envy v1.9.0
        github.com/gobuffalo/mw-csrf v1.0.0
        github.com/gobuffalo/mw-forcessl v0.0.0-20200131175327-94b2bd771862
        github.com/gobuffalo/mw-i18n v1.1.0
        github.com/gobuffalo/mw-paramlogger v1.0.0
        github.com/gobuffalo/packr/v2 v2.8.0
        github.com/gobuffalo/suite v2.8.2+incompatible
        github.com/unrolled/secure v1.0.8
)
@github-actions
Copy link

github-actions bot commented Aug 7, 2021

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions
Copy link

This issue was closed because it has been stalled for 5 days with no activity.

@sio4 sio4 added the # chkme label Sep 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant