작성자 : 박찬영

마지막 업데이트 : 2024년 03월 21일

페이지 템플릿

페이지 템플릿은 웹사이트 페이지 또는 랜딩 페이지로 활용할 수 있습니다.
구축 과정은 거의 동일하지만, 웹사이트 페이지는 웹사이트의 일부 정보를 표시하고 유기적으로 검색되도록 설계된 반면 랜딩 페이지는 일반적으로 특정 마케팅 제안이나 캠페인으로 활용됩니다.


페이지 관련 변수

  • 변수명

    타입

    설명

  • String

    페이지 url

  • String

    페이지 제목


최신글 가져오기

함수는 지정된 블로그를 최신순으로 정렬하여 반환합니다.

이 기능은 페이지당 게시물 200개와 호출 10개로 제한됩니다.
  • Hubl
  • 출력값
{@{ blog_recent_posts("default", 5) }@}
{@% set rec_posts = blog_recent_posts("default", 5) %@}
{@% for rec_post in rec_posts %@}
    <div class="post-title">{@{ rec_post.name }@}</div>
{@% endfor %@}
[Recent post title 1, Recent post title 2, Recent post title 3, Recent post title 4, Recent post title 5]

<div class="post-title">Recent post title 1</div>
<div class="post-title">Recent post title 2</div>
<div class="post-title">Recent post title 3</div>
<div class="post-title">Recent post title 4</div>
<div class="post-title">Recent post title 5</div>
  • 변수명

    타입

    설명

  • Blog ID

    사용할 블로그를 지정합니다. 블로그 ID는 모듈 blog 필드 에 의해 얻을 수 있습니다.
  • Integer

    반환할 개수


최신 태그글 가져오기

함수는 지정된 태그에 대한 일련의 블로그 게시물 개체를 최신순으로 정렬하여 반환합니다. 이 일련의 게시물을 변수에 저장하고 for 루프를 통해 반복하여 특정 태그별로 게시물의 사용자 정의 게시물 목록을 만들 수 있습니다.

이 기능은 페이지당 게시물 100개와 호출 10개로 제한됩니다.
  • Hubl
  • 출력값
{@{ blog_recent_tag_posts("default", "marketing-tips", 5) }@}
{@% set tag_posts = blog_recent_tag_posts("default", ["marketing", "fun", "inbound"], 3, "AND") %@}
{@% for tag_post in tag_posts %@}
    <div class="post-title">{@{ tag_post.name }@}</div>
{@% endfor %@}
[Post about Marketing 1, Post about Marketing 2, Post about Marketing 3, Post about Marketing 4, Post about Marketing 5]

<div class="post-title">Post about Marketing</div>
<div class="post-title">Post about Fun</div>
<div class="post-title">Post about Inbound</div>
  • 변수명

    타입

    설명

  • Blog ID

    사용할 블로그를 지정합니다. 블로그 ID는 모듈 blog 필드 에 의해 얻을 수 있습니다 .
  • 필수

    String

    필터링할 태그를 지정합니다. 최대 10개의 태그를 쉼표로 구분하여 포함할 수 있습니다. 여러 단어가 포함된 태그는 소문자여야 하며 공백은 하이픈으로 대체되어야 합니다.
  • Integer

    반환할 개수입니다. 이 매개변수는 논리 매개변수를 사용하는 경우 필수입니다.

  • String

    AND 또는 OR 논리 연산자를 사용하여 결과를 필터링합니다.


인기글, 인기 태그글 가져오기

함수는 지정된 블로그를 인기순으로 정렬하여 반환합니다. 또한 선택적으로 태그를 기준으로 필터링 할 수 있습니다

이 기능은 페이지당 게시물 200개와 호출 10개로 제한됩니다.
  • Hubl
  • 출력값
{@% set pop_posts = blog_popular_posts("default", 5, ["marketing-tips", "sales-tips"], "popular_past_month", "AND") %@}
{@% for pop_post in pop_posts %@}
    <div class="post-title">{@{ pop_post.name }@}</div>
{@% endfor %@}
[Popular post title 1, Popular post title 2, Popular post title 3, Popular post title 4, Popular post title 5]

<div class="post-title">Popular post title 1</div>
<div class="post-title">Popular post title 2</div>
<div class="post-title">Popular post title 3</div>
<div class="post-title">Popular post title 4</div>
<div class="post-title">Popular post title 5</div>
  • 변수명

    타입

    설명

  • Blog ID

    사용할 블로그를 지정합니다. 블로그 ID는 모듈 blog 필드 에 의해 얻을 수 있습니다.
  • Integer

    반환할 개수 (최대 200, 기본값 10)

  • Array

    태그를 기준으로 필터링하고 싶은 경우 선택적으로 사용

  • String

    게시물을 필터링하기 위한 선택적 기간 범위입니다. 기본값은  "popular_past_year"입니다. 다음 중 하나여야 합니다.

    • "popular_all_time" 
    • "popular_past_year"
    • "popular_past_six_months" 
    • "popular_past_month"

    이 매개변수는 논리 매개변수를 사용하는 경우 필수입니다.

  • String

    AND 또는 OR 논리 연산자를 사용하여 결과를 필터링합니다.


포스트 ID로 정보 가져오기 (여러개)

이 함수는 게시물 ID들을 배열에 넣어서 해당 게시물들의 정보를 반환합니다.

이 기능은 페이지당 10번의 호출로 제한됩니다.

 

  • Hubl
  • 출력값
{@% set contents = content_by_ids([4715624297, 4712623297, 5215624284]) %@}
<ul>
{@% for content in contents %@}
    <li>
        <a href="{@{ content.absolute_url }@}">{@{content.title}@}</a>
    </li>
    {@% endfor %@}
</ul>
<ul>
<li>
<a href="http://www.hubspot.com/blog/articles/kcs_article/email/how-do-i-create-default-values-for-my-email-personalization-tokens">How do I create default values for my email or smart content personalization tokens?</a>
</li>
<li>
<a href="https://blog.hubspot.com/marketing/content-marketing-strategy-guide">Content Marketing Strategy: A Comprehensive Guide for Modern Marketers</a>
</li>
</ul>
  • 변수명

    타입

    설명

  • Array

    조회할 페이지 또는 블로그 게시물 id 배열입니다.

    최대 100개의 개체를 전달할 수 있습니다.


포스트 ID로 정보 가져오기 (1개)

이 함수는 게시물 ID를 넣어서 해당 게시물의 정보를 반환합니다.

이 기능은 페이지당 10번의 호출로 제한됩니다.

 

  • Hubl
  • 출력값

{@% set my_content = content_by_id(4715624297) %@}
<ul>
    <li>
        <a href="{@{ my_content.absolute_url }@}">{@{my_content.title}@}</a>
    </li>
</ul>

<ul>
<li>
<a href="http://www.hubspot.com/blog/articles/kcs_article/email/how-do-i-create-default-values-for-my-email-personalization-tokens">How do I create default values for my email or smart content personalization tokens?</a>
</li>
</ul>
  • 변수명

    타입

    설명

  • Integer

    조회할 페이지 또는 블로그 게시물 id 입니다.