Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorder sections/fields via a new `priority` option #133

merged 2 commits into from Apr 16, 2019


None yet
1 participant
Copy link

srobbin commented Apr 11, 2019

Previously, Vapid would order sections alphabetically, and fields by their order of appearance in the HTML. Now, you can pass a priority option to them to specify their ordering in the dashboard.

#The input fields will appear as: title, body, photo
{{#section about}}
  {{photo type=image}}
  {{title priority=1}}
  {{body type=html priority=2}}

# This section will appear before About
{{#section another priority=1}}

# The Bios and Offices sections will still appear after About/Another (see below)
{{#section bios multiple=true}}
  {{photo type=image}}
  {{name priority=1}}

{{#section offices multiple=true priority=1}}

A few things to note:

  • The General section will always be first (unless it has no fields, in which case it will be hidden)
  • Subsequent sections will still be grouped into non-repeating sections followed by repeating sections (see screenshot below)
  • Sections/fields that don't specify a priority will appear at the end

Screen Shot 2019-04-11 at 12 19 32 PM

@srobbin srobbin merged commit 488fedc into master Apr 16, 2019

2 checks passed

ci/circleci: build Your tests passed on CircleCI!
ci/circleci: build-10 Your tests passed on CircleCI!

@srobbin srobbin deleted the priority branch Apr 16, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.