Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8523111
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:18:57+00:00 2026-06-11T07:18:57+00:00

Using The Play Framework how easy would it be to allow an admin user

  • 0

Using The Play Framework how easy would it be to allow an admin user to create and edit templates and then render the templates.

So essentially CMS like functionality.

I am new to the Play Framework and am evaluating it for use in a personal project.

Edit
An alternative is just to use an editor like CKEditor and just save the html from that in the database and provide some reskinning through CSS but would prefer to allow users who know more to edit templates as well.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T07:18:58+00:00Added an answer on June 11, 2026 at 7:18 am

    The answer to this question depends on if you need dynamic content in the editable pages.

    If you don’t, then just save HTML text. If you do, and it is really limited (like replacing a name field), then you could simply do a simple string substitution on the HTML text.

    If you decide you want the full glory of editing Play templates on the fly (and are ok with the security consideration), then you can compile templates. Note this is how it is done in Play 1.2.x – though no doubt similar in Play 2.x. Make sure you cache templates, since they are expensive to compile (check TemplateLoader.load(VirtualFile file) for ideas on how to cache and update)

    String name = "mytemplate";
    String source = "hi ${name}";
    Template template = new GroovyTemplateCompiler().compile(new GroovyTemplate(name, source)));
    Map<String,Object> args = new HashMap<String,Object>();
    args.put("name","mom");
    String renderedHtml = template.render(args);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there an easy way to do the following, using the Play! framework and
I am using Play framework 2.0.1 in scala to create an application that has
I am using Play Framework 1.2.4 with PostgreSQL and JPA . I would like
I'm using play framework version 1.2.5 and I would like to retrieve all the
I am using Play Framework and want to implement Invite Friends feature when user
I'm using play-framework 2.0 (java web-framework) with postgresql. what encryption type for a user's
I'm using the Play Framework and have a question about templates: I want to
i am using play framework , i need to check the user's permissions with
so i am using the play framework and I'm try to create multiple submit
I am using Play Framework 2.0 with Scala. So I have an action that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.