Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

dumb question: how to create a page with custom HTML

Avatar

Avatar
Ignite 10
Level 4
TB3dock
Level 4

Likes

34 likes

Total Posts

203 posts

Correct Reply

4 solutions
Top badges earned
Ignite 10
Boost 25
Give Back 25
Validate 10
Validate 1
View profile

Avatar
Ignite 10
Level 4
TB3dock
Level 4

Likes

34 likes

Total Posts

203 posts

Correct Reply

4 solutions
Top badges earned
Ignite 10
Boost 25
Give Back 25
Validate 10
Validate 1
View profile
TB3dock
Level 4

02-06-2021

I have been writing slingservlets to do backend functions, and testing with postman.

However, sometimes I need to create a test HTML page, e.g. with a form to upload a file.

In aem its easy to create pages, but you can only add text/images, you cant edit the HTML.

Looking in the project, I cant see an obvious way to create a HTML page.  Any suggestions where to look?

There are a lot of tutorials on creating pages from templates, but these dont seem to include editing HTML.  Presumably I need to write some code to create a new template with my HTML, then create a page to use that template.  I cant see how to create a template where I can defined the HTML the template uses?  

 

Or do I instead have to create a new component with a simple HTML form in it, then drop that into an existing page template?

 

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Establish
MVP
BrianKasingli
MVP

Likes

610 likes

Total Posts

588 posts

Correct Reply

230 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile

Avatar
Establish
MVP
BrianKasingli
MVP

Likes

610 likes

Total Posts

588 posts

Correct Reply

230 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile
BrianKasingli
MVP

02-06-2021

@TB3dock,

For your use case, custom HTML for local development environment & test purposes, I would suggest you create a simple component. Next, ensure your component is within a component group, so you can drag and drop the component on the page. 

Once when you have created your simple AEM component, you can go ahead and edit your existing page. Drag the component into the page. If your available component is not listed in the components sidebar, then you might want to double-check if your template policies (editable template), or allowed components (static template).

If you want to write HTML into your webpage the quick and dirty way, then you can also make changes directly into your basepage.html, where HTML will be visible on your entire local development environment. 

Answers (0)