CMS Development

JonnyZOO
Contributor

Custom blog author HTML

SOLVE

Hi there

 

I'd like to create custom 'blog author' section that looks like this: https://www.zoodigital.com/news/mazin-to-tackle-4k4charity-at-ibc-2018?hs_preview=KipJskmf-615554093...

 

Currently, the code looks like this:

<div class="full-article-footer">
<div class="article-footer">
<div class="avatar-module">
<img class="avatar" height="100px" src="https://app.hubspot.com/settings/avatar/8eb157f261bdca2aabc7c24e3db0322e">
</div>
<p>Written by
<br>
<a class="author-link" href="https://www.zoodigital.com/news/author/jonny-stringer">Jonny Stringer</a>
<br>
</p>
</div>
</div>

 

Is there a way to pull this info from the HubL token in the blog settings? Rather than changing the HTML at a page level.

 

Screen Shot 2018-09-26 at 12.53.42.png 

0 Upvotes
1 Accepted solution
Stephanie-OG
Solution
Key Advisor

Custom blog author HTML

SOLVE

Hi there!

 

Yes, you should be able to pull in the author information using HubL. The following should work: 

 

<div class="full-article-footer">
<div class="article-footer">
<div class="avatar-module">
<img class="avatar" height="100px" src="{{ content.blog_post_author.avatar }}">
</div>
<p>Written by
<br>
<a class="author-link" href="{{ group.absolute_url }}/author/{{ content.blog_post_author.slug }}">{{ content.blog_post_author.display_name }}</a>
<br>
</p>
</div>
</div>

You can find the full documentation here

 

I hope that helps!

 


Stephanie O'Gay GarciaHubSpot Design / Development

Website | Contact

 

If this helped, please mark it as the solution to your question, thanks!

View solution in original post

0 Upvotes
2 Replies 2
Stephanie-OG
Solution
Key Advisor

Custom blog author HTML

SOLVE

Hi there!

 

Yes, you should be able to pull in the author information using HubL. The following should work: 

 

<div class="full-article-footer">
<div class="article-footer">
<div class="avatar-module">
<img class="avatar" height="100px" src="{{ content.blog_post_author.avatar }}">
</div>
<p>Written by
<br>
<a class="author-link" href="{{ group.absolute_url }}/author/{{ content.blog_post_author.slug }}">{{ content.blog_post_author.display_name }}</a>
<br>
</p>
</div>
</div>

You can find the full documentation here

 

I hope that helps!

 


Stephanie O'Gay GarciaHubSpot Design / Development

Website | Contact

 

If this helped, please mark it as the solution to your question, thanks!

0 Upvotes
JonnyZOO
Contributor

Custom blog author HTML

SOLVE

Perfect, thanks @Stephanie-OG!

0 Upvotes