I create a tag whose content is static,
for example: header.html
then I insert to a static html eg: about.htm,
when open:
http://localhost:9000/about.htm
still get #{header /} in the browser.
how to solve it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Did you put your
header.htmlfile in theapp/views/tagsdirectory?update: Since you said you did, it’s probably because you need to render the html server side via a controller.
So try creating a controller and putting it in the controllers package. Something like this:
And then make sure that
about.htmlives in the folderapp/views/About. Note: I’m not entirely sure, but you might need to renameabout.htmto beabout.html(but probably not, but just keep it in mind if it doesn’t work for you).So to get the controller to render the about.htm with the resolved header.html, you will need to hit the url
http://localhost:9000/About/aboutof course, you can clean that url up by adding this to the
routesfile:Using the above, you can simply hit this url
http://localhost:9000/about.