[solved] latest entry and kitchensink

A forum for Bolt related questions / issues

[solved] latest entry and kitchensink

Postby isul » Wed Aug 06, 2014 7:15 am

Please help me...

1. I have make a menu in aside.twig. The menu is "Latest Entry". But not work. here the code
Code: Select all
<h3>Recent entry</h3>
{% set entry = 'entries/latest/5' %}
<ul>
    {% for entry in entries %}
        <li><a href="{{ entries.link }}">{{ entries.title }}</a></li>
    {% else %}
        <p>No recent pages.</p>
    {% endfor %}
</ul>


2. Why can i make a new kitchensink? is it a bug? i am using latest XAMPP.

Tengs a lot for the answer. :)
Last edited by isul on Fri Aug 08, 2014 2:01 am, edited 1 time in total.
isul
 
Posts: 13
Joined: Tue Jul 22, 2014 2:32 am

Re: [ask] latest entry and kitchensink

Postby ningus » Wed Aug 06, 2014 8:56 am

Your code should look like this
Code: Select all
    <h3>Recent entry</h3>
    {% setcontent records = 'entries/latest/5' %}
    <ul>
        {% for record in records %}
            <li><a href="{{ record.link }}">{{ record.title }}</a></li>
        {% else %}
            <li>No recent pages.</li>
        {% endfor %}
    </ul>

Output in lists like this is records anyway, with setcontent you do a filtering for contenttypes. Look into the base-theme and documentation, copy code examples from there and tweak them for your liking.

Kitchensink is an example contentype which contains all possible fieldtypes, the first thing I do in contentypes.yml is commenting out all lines for Kitchensink, to keep them there for reference.
ningus
 
Posts: 33
Joined: Fri Jun 21, 2013 4:05 pm
Location: Europe

Re: [ask] latest entry and kitchensink

Postby isul » Thu Aug 07, 2014 3:02 am

it is working. Tengs a lot ningus. You are really the star. :)
isul
 
Posts: 13
Joined: Tue Jul 22, 2014 2:32 am


Return to Bolt Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

cron