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

Add Dynamic Attributes to Page Container DIV #376

Closed
signalpoint opened this issue Sep 26, 2014 · 0 comments
Closed

Add Dynamic Attributes to Page Container DIV #376

signalpoint opened this issue Sep 26, 2014 · 0 comments

Comments

@signalpoint
Copy link
Owner

Right now the page.tpl.html file needs to be structured like this:

<div id="{:drupalgap_page_id:}" data-role="page" class="{:drupalgap_page_class:}">
  <!-- ... -->
</div>

This means we're stuck with id, data-role and class as the only attributes we can attach to the page. Adjust the page.tpl.html file requirements to be:

<div {:drupalgap_page_attributes:}>
  <!-- ... -->
</div>

This will allow hook_menu() items (and any custom module menu link alterations via hook_deviceready()) to place any attributes they want onto the page container div.

signalpoint added a commit that referenced this issue Sep 26, 2014
…rupalgap_goto_generate_page_and_go(), so it can relay it to drupalgap_add_page_to_dom() which now accepts a single JSON object argument (with the menu_link bundled inside of it), and then use the newly bundled object to inject the page attributes into the page attributes place holder in page.tpl.html.
signalpoint added a commit that referenced this issue Sep 26, 2014
signalpoint added a commit that referenced this issue Sep 26, 2014
…rupalgap_goto_generate_page_and_go(), so it can relay it to drupalgap_add_page_to_dom() which now accepts a single JSON object argument (with the menu_link bundled inside of it), and then use the newly bundled object to inject the page attributes into the page attributes place holder in page.tpl.html.
signalpoint added a commit that referenced this issue Sep 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant