Skip to content

Commit

Permalink
Link Feather title now is optional.
Browse files Browse the repository at this point in the history
Changed 'name' to 'title' and made it optional. Close #36
All non-titled feathers will be updated and offered as separate downloads.
  • Loading branch information
xhezairbey committed Oct 26, 2011
1 parent fbe8dd2 commit 1f0a9f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions feathers/link/link.php
@@ -1,14 +1,15 @@
<?php <?php
class Link extends Feathers implements Feather { class Link extends Feathers implements Feather {
public function __init() { public function __init() {
$this->setField(array("attr" => "name",
"type" => "text",
"label" => __("Title", "link"),
"optional" => true,
"bookmarklet" => "title"));
$this->setField(array("attr" => "source", $this->setField(array("attr" => "source",
"type" => "text", "type" => "text",
"label" => __("URL", "link"), "label" => __("URL", "link"),
"bookmarklet" => "url")); "bookmarklet" => "url"));
$this->setField(array("attr" => "name",
"type" => "text",
"label" => __("Name", "link"),
"bookmarklet" => "title"));
$this->setField(array("attr" => "description", $this->setField(array("attr" => "description",
"type" => "text_block", "type" => "text_block",
"label" => __("Description", "link"), "label" => __("Description", "link"),
Expand Down
2 changes: 1 addition & 1 deletion themes/stardust/feathers/link.twig
@@ -1,6 +1,6 @@
{% extends "content/post.twig" %} {% extends "content/post.twig" %}


{% block content %} {% block content %}
<h2 class="title"><a href="$post.source" class="link">$post.name</a></h2> <h2 class="title"><a href="$post.source" class="link">${ "%s" | format(post.name | fallback(post.source)) }</a></h2>
${ post.description | read_more } ${ post.description | read_more }
{% endblock %} {% endblock %}

0 comments on commit 1f0a9f2

Please sign in to comment.