scrivener_html icon indicating copy to clipboard operation
scrivener_html copied to clipboard

Most config options don't work in `config.exs`?

Open nickjj opened this issue 7 years ago • 4 comments

Hi,

If I set the following in my config.exs file, only the view_style takes effect:

config :scrivener_html,
  routes_helper: MyApp.Router.Helpers,
  view_style: :bootstrap_v4,
  distance: 5, next: "Next", previous: "Previous",
  first: true, last: true

I would have expected the other config options to be applied as well.

I wanted to do this because I have pagination on 4 different resources, and I didn't want to have to customize the next, previous, etc. for each one individually but currently that seems to be the only way to do it.

Also on a side note, first / last never show up, even if I set them directly on pagination_links in my eex template.

I'm running 1.7.1 (the latest release at the time of this issue).

nickjj avatar Jul 19 '18 20:07 nickjj

Yep, looks like we just pull the application environment config for those values https://github.com/mgwidmann/scrivener_html/blob/master/lib/scrivener/html.ex#L98

I would accept a PR to make this addition.

mgwidmann avatar Jan 26 '19 05:01 mgwidmann

@mgwidmann I can definitely help with this once you have the time to review #86 and then I can work on top of that PR.

shulhi avatar Mar 13 '19 01:03 shulhi

Ping, going to close this soon if no one wants this feature.

mgwidmann avatar Dec 17 '19 03:12 mgwidmann

I think people do want it. I know I still do.

nickjj avatar Dec 17 '19 12:12 nickjj