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

Receiving the pagelet name in the pagelet-loaded javascript event #17

Open
Frexuz opened this issue Aug 2, 2017 · 0 comments
Open

Receiving the pagelet name in the pagelet-loaded javascript event #17

Frexuz opened this issue Aug 2, 2017 · 0 comments

Comments

@Frexuz
Copy link

Frexuz commented Aug 2, 2017

Would it be possible to get the name of the pagelet?

<%= pagelet :pagelets_company_onboarding_progress, remote: true %> would give me company_onboarding_progress, and possibly which action as well, as extra parameters.
Basically what the css classes on the pagelet div are.

It would be a bit cleaner on the front end side, compared to fetching it from the content parameter.

  • Developers would have to write their own regexp, or
  • Convert the content to DOM nodes. A big pagelet could possibly be a bit expensive to convert with $()?

As I'm already getting it with regexp at the moment, I don't see this issue as important, just an improvement :)

Thanks for an awesome gem <3

@Frexuz Frexuz changed the title Receiving the pagelet name with in the pagelet-loaded javascript event Receiving the pagelet name in the pagelet-loaded javascript event Aug 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant