Where can I fins the ejs
of default listing?
#89
Replies: 2 comments 7 replies
-
Hello! The item template for our implementation can be a little tough to decipher as it contains quite a bit of other coordinate to enable features and customization. That said, what you have should be pretty close to what is needed. I haven't run this, but I think this should support filtering and sorting: <div class="list">
<% for (const item of items) { %>
<div <%= metadataAttrs(item) %>>
<h5 class="listing-title"><%- item.title %></h5>
<div class="listing-categories">
<% for (const cat of item.categories) {%>
<div class="listing-category" onclick="window.quartoListingCategory('<%- cat %>'); return false;">
<%- cat %>
</div>
<% } %>
</div>
<p class="quarto-title-authors listing-author">
<%- item.author %>
</p>
<span class="listing-description">
<%- item.description %>
</span>
</div>
<% } %>
</div> The changes I made are:
1 and 2 don't have to be done with a DIV, we just need some kind of container to https://quarto.org/docs/websites/website-listings-custom.html#sorting-filtering-and-pagination One other note - for custom listings like this, you will need to explicitly enable the UI by adding the following to your document front matter as well: ---
filter-ui: true
sort-ui: true
--- Hope this gets you going, let us know how it works out! |
Beta Was this translation helpful? Give feedback.
-
Thank you so much! It works like a charm! May I ask one more thing? Is it possible to make listings appear in sections? For example, I am using categories to mark if an item is published article, working paper or work in progress. Can I somehow make it look like this Articles[Item 1] [Item 2] ... Working papers[Item 1] [Item 2] ... I saw in the documentation the possibility of having multiple listings based on folder locations. But since working papers and work in progress are likely to be moved around in future, I was worried that it may create problems with links. So, I was wondering if it is possible to use categories instead of folders to display them grouped? Thanks again! |
Beta Was this translation helpful? Give feedback.
-
Hi!
I am trying to write an
ejs
for custom listing. I would like to make a list of my publications. It's a rather simple formatHowever, it does not maintain the ability to filter by text or by selecting the categories.
So, I was wondering where could I see the
ejs
for the current default listing template, to be able to only change the parts I want to change. I only want to get rid of left column, where currently the author names are, and move the author names below the title.I would appreciate any help! I am new to Quarto and definitely have never seen
ejs
before.Thank you!
Beta Was this translation helpful? Give feedback.
All reactions