Backlinks don't seem to work in Magazine template?
I'm trying to replace latest links in entry.html to backlinks, i.e.:
{{#backlinks}}
<a href="{{{url}}}" class=" dim no-underline db pv2 bt b--black-10" style="position:relative">
<span class="w-10 fr db" style="background: no-repeat url({{thumbnail.medium.url}}) 0 0 / cover">
<span class=" db" style="height:0;padding-bottom:100%;overflow:hidden">
</span>
</span>
<span class="fl w-80 db black-80 flex" style="display: flex;
flex-direction: column;
justify-content: center;"><span >{{title}}</span></span>
<span class="cf"></span>
</a>
{{/backlinks}}
I replaced {{#recent_entries}}
with {{#backlinks}}
in above but nothing shows.
I can confirm backlinks code works fine on blog template.
Can you help sort this? This is on my "commons" blot account. I have templates disabled when I'm not hacking away on it to keep bots/folks from browsing it so you'll want to enable it and set use template to Copy of Magazine.
(For some reason whenever I disable templates and turn it back on it always defaults to blog template so I have to switch it to magazine each time. Could be a bug?)
For an example blog page with backlinks look for the "snippets" one.
Is your use of {{#backlinks}}.{{/backlinks}}
inside the {{#entry}}...{{/entry}}
block? recentEntries
is a top-level property, backlinks
are a property of an entry. If not, try this instead:
{{#entry.backlinks}}
...
{{/entry.backlinks}}
Answered 2 years ago ·
Edit answer
That did the trick, yay!
In addition, I vaguely remember asking here about having backlinks work on pages. I think it was something you might do or no?
Thanks, Ray
Answered 2 years ago · Edit answerBacklinks should work on pages! If they're not, that'll be a bug – please share a link to a page without backlinks working as expected either here or over email
Answered 2 years ago · Edit answer