Jump to content

mn-martin

Members
  • Posts

    14
  • Joined

  • Last visited

Community Answers

  1. mn-martin's post in PageLister and PageFieldType is tedious on duplicate titles was marked as the answer   
    Hello Tom,
    thank you for that hint. It may work in the most cases. Unfortunately in my special field setup it didn't work. Anyways I've came up with another solution:
    // Admin > Setup > Fields > Custom PHP code to find selectable pages $categories = $pages->find('has_parent="/categories/", template="category"'); foreach ($categories as &$category) { $breadcrumbs = wire('helper')->buildBreadcrumbList($category); $category->title = join(' / ', $breadcrumbs); } return $categories; Since I don't execute $category->save() that should be perfectly fine there and it seems to work like a charm without any side effects.
×
×
  • Create New...