mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02:00
@@ -66,6 +66,9 @@ func (scp *ShortcodeWithPage) Scratch() *Scratch {
|
||||
|
||||
// Get is a convenience method to look up shortcode parameters by its key.
|
||||
func (scp *ShortcodeWithPage) Get(key interface{}) interface{} {
|
||||
if scp.Params == nil {
|
||||
return nil
|
||||
}
|
||||
if reflect.ValueOf(scp.Params).Len() == 0 {
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user