summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
Diffstat (limited to 'content')
-rw-r--r--content/item.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/content/item.go b/content/item.go
index e6c8243..eb79aa0 100644
--- a/content/item.go
+++ b/content/item.go
@@ -13,6 +13,7 @@ import (
// and it will override the slug created by Item's SetSlug with your struct's
type Sluggable interface {
SetSlug(string)
+ ItemSlug() string
}
// Identifiable enables a struct to have its ID set/get. Typically this is done
@@ -67,6 +68,11 @@ func (i *Item) SetSlug(slug string) {
i.Slug = slug
}
+// ItemSlug sets the item's slug for its URL
+func (i *Item) ItemSlug() string {
+ return i.Slug
+}
+
// ItemID gets the Item's ID field
// partially implements the Identifiable interface
func (i Item) ItemID() int {