https://avo.cool logo
`Sidebar fields` - those don't show on
# general
f
Sidebar fields
- those don't show on index page - is this intentional?
l
Hi @fresh-thailand-89388 yes it intentional
Sidebar only renders on show view, so the fields declared inside a sidebar ar not parsed on index
on the thread that you mentioned I posted a code snippet to mannually declare fields on both index / sidebar without duplication
Copy code
ruby
def fields_bag(**extra_args)
  field :name ..., **extra_args
  field :skill ..., **extra_args
end

def fields
  fields_bag(only_on: :index)

  sidebar do
    fields_bag
  end
end
f
Yes, I used that , and it worked, thank you!! (the AI bot here helped to find it)
l
Awesome! we should have this as a guide and a link to it on the sidebar documentation
f
would be amazing, yes!