PHP Thames Valley
This commit is contained in:
parent
4c7d05faad
commit
81222d002f
7 changed files with 51 additions and 6 deletions
|
@ -1,7 +1,7 @@
|
|||
sculpin_content_types:
|
||||
# speakers:
|
||||
# permalink: /speakers/:basename/
|
||||
# talks:
|
||||
# permalink: /talks/:basename/
|
||||
speakers:
|
||||
permalink: /speakers/:basename/
|
||||
talks:
|
||||
permalink: /talks/:basename/
|
||||
posts:
|
||||
enabled: false
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
name: 'My New Sculpin Site'
|
||||
name: 'PHP Thames Valley'
|
||||
locale: en
|
||||
|
|
12
notes.txt
Normal file
12
notes.txt
Normal file
|
@ -0,0 +1,12 @@
|
|||
http://localhost:8000/speakers/rob-allen
|
||||
http://localhost:8000/talks/tuis
|
||||
|
||||
- Enable speaker and talk content types.
|
||||
- Build list of all talks.
|
||||
- Sort list of talks by date.
|
||||
- Show speaker name on a talk.
|
||||
- Link from talk to speaker page.
|
||||
- Show speaker information.
|
||||
- Show other talks by the same speaker.
|
||||
- Extending Sculpin with custom Twig extensions.
|
||||
|
|
@ -2,4 +2,18 @@
|
|||
|
||||
{% block content_wrapper %}
|
||||
<h1>{{ page.name }}</h1>
|
||||
|
||||
<img style="height: 50px; width: 50px;" src="{{ page.imageUrl }}"/>
|
||||
|
||||
{% block content %}{% endblock %}
|
||||
|
||||
<hr>
|
||||
|
||||
{% for talk in data.talks if talk.speakers.0 == page.name %}
|
||||
<li>
|
||||
<a href="{{ talk.url }}">
|
||||
{{ talk.title }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -2,4 +2,10 @@
|
|||
|
||||
{% block content_wrapper %}
|
||||
<h1>{{ page.title }}</h1>
|
||||
|
||||
{{ page.date|date('jS F Y') }}
|
||||
|
||||
{% for speaker in page.speakers %}
|
||||
{{ speaker }}
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
---
|
||||
name: Dan Leech
|
||||
imageUrl: /images/highres_257208698.jpeg
|
||||
layout: speaker
|
||||
use: [talks]
|
||||
---
|
||||
|
|
|
@ -1,4 +1,15 @@
|
|||
---
|
||||
layout: base
|
||||
title: Hello, World!
|
||||
title: Hello, PHP Thames Valley!
|
||||
use: [talks]
|
||||
---
|
||||
|
||||
<ul>
|
||||
{% for talk in data.talks %}
|
||||
<li>
|
||||
<a href="{{ talk.url }}">
|
||||
{{ talk.title }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue