본문 바로가기
JAVA(자바)

타임리프 replace 예제 (페이지별 타이틀 다르게 정의하려 할 때)

by janeparker 2022. 10. 26.
728x90
반응형
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">


//(~{::title},~{::link})에 강제로
//<title>메인 타이틀</title>이 들어가게 된다.

<head th:replace="template/layout/base :: common_header(~{::title},~{::link})">
    <title>메인 타이틀</title>
    
    
    <link rel="stylesheet" th:href="@{/css/bootstrap.min.css}">
    <link rel="stylesheet" th:href="@{/themes/smoothness/jquery-ui.css}">
    
    
</head>
<body>
메인 컨텐츠
</body>
</html>
728x90
반응형

'JAVA(자바)' 카테고리의 다른 글

타임리프 기본 문법  (0) 2022.10.26
포트가 중복되었을 경우, 포트 죽이기  (0) 2022.10.22