meta_data.go 828 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. package fetdata
  2. import (
  3. "golang-fave/utils"
  4. )
  5. func (this *FERData) MetaTitle() string {
  6. if this.DataRow != nil {
  7. if this.Wrap.CurrModule == "index" {
  8. return this.DataRow.(*utils.MySql_page).A_meta_title
  9. }
  10. } else if this.Is404 {
  11. // Return it from settings
  12. return "Page not found"
  13. }
  14. return ""
  15. }
  16. func (this *FERData) MetaKeywords() string {
  17. if this.DataRow != nil {
  18. if this.Wrap.CurrModule == "index" {
  19. return this.DataRow.(*utils.MySql_page).A_meta_keywords
  20. }
  21. } else if this.Is404 {
  22. // Return it from settings
  23. return ""
  24. }
  25. return ""
  26. }
  27. func (this *FERData) MetaDescription() string {
  28. if this.DataRow != nil {
  29. if this.Wrap.CurrModule == "index" {
  30. return this.DataRow.(*utils.MySql_page).A_meta_description
  31. }
  32. } else if this.Is404 {
  33. // Return it from settings
  34. return ""
  35. }
  36. return ""
  37. }