We are trying to publish a .txt
using a code Component by creating a Region and using a custom Page Template for .txt
files.
Is there a way to remove the HTML tags that the Region is adding for my Page when I render http://localhost:9080/dev/rb.txt
<%-- <!DOCTYPE html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%> --%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="dxa" uri="http://www.sdl.com/tridion-dxa"%>
<%@ taglib prefix="xpm" uri="http://www.sdl.com/tridion-xpm"%>
<jsp:useBean id="pageModel" type="com.sdl.webapp.common.api.model.PageModel" scope="request" />
<jsp:useBean id="markup" type="com.sdl.webapp.common.markup.Markup" scope="request" />
<dxa:region name="MainBody" />
This is markup for the Region we are using and below is the Page with code Component.
I want to remove the <html>
and the <body>
tag from the source to render an raw text file. Could anyone suggest an approach for this?
Follow up question on this : Render the Robots.txt using DXA 1.5 Java