Skip to content
This repository was archived by the owner on Oct 29, 2020. It is now read-only.

Make footer links editable#2261

Merged
desmondmorris merged 4 commits intoDoSomethingArchive:devfrom
desmondmorris:footer-funtime-nbd
Jun 2, 2014
Merged

Make footer links editable#2261
desmondmorris merged 4 commits intoDoSomethingArchive:devfrom
desmondmorris:footer-funtime-nbd

Conversation

@desmondmorris
Copy link
Contributor

What's this PR do?

  • Provides UI for editing footer links via the theme settings form
  • Provides a UI for toggling social links
  • Modifies footer theme function to accept link and social variables
  • Updates the theme footer call in preprocess_page adding the social and links variables from theme settings
  • Provides default settings via the theme info file to prevent disaster.

We will need to revisit and re-org this theme-settings form as it is quickly growing. A proper gameplan/rules may be worth thinking about @DFurnes

Where should the reviewer start?

  1. Footer.tpl.php - https://github.com/desmondmorris/dosomething/blob/footer-funtime-nbd/lib/themes/dosomething/paraneue_dosomething/templates/system/partials/footer.tpl.php
  2. Footer theme function - https://github.com/desmondmorris/dosomething/blob/footer-funtime-nbd/lib/themes/dosomething/paraneue_dosomething/includes/theme.inc#L30-L45
  3. Preprocessor to stuff vars into the template - https://github.com/desmondmorris/dosomething/blob/footer-funtime-nbd/lib/themes/dosomething/paraneue_dosomething/includes/preprocess.inc#L35-L62

How should this be manually tested?

  1. Checkout my branch
  2. Clear cache
  3. Visit the admin theme settings for paraneue dosomething. Toggle social links. Visit home and confirm the enabled/disabled social icons in the footer are represented properly
  4. Return to the admin page and update the footer links by overriding the column headers, links and class values. Take note to the link formatting (Link Text|http://url.com)

Any background context you want to provide?

This is the starting point to making the footer completely manageable via theme settings.

What are the relevant tickets?

Fixes #2092

Screenshots (if appropriate)

Super primitive link adding capabilities: Should be good enough for now
screen shot 2014-05-21 at 2 55 05 pm

cc: @weerd @DFurnes @aaronschachter - its not particularly artisanal, but its a start. chime in please

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not crazy about using the paths as the input here, it'd be nicer to use node/[nid]. Even though you are using the l function in the preprocess, i believe this would break things if the path changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@angaither
Copy link
Contributor

Also, fixes #1321

@aaronschachter
Copy link
Contributor

Looks good to me 👍

@DFurnes
Copy link
Contributor

DFurnes commented May 22, 2014

Only seeing the first link in each heading when I test on my local:
screen shot 2014-05-22 at 4 26 39 pm

Looks like the \n escape characters from the default values aren't getting parsed correctly?
screen shot 2014-05-22 at 4 27 44 pm

@DFurnes
Copy link
Contributor

DFurnes commented May 22, 2014

Looks good once I manually added the line breaks in the theme settings.

@desmondmorris
Copy link
Contributor Author

@aaronschachter @DFurnes that should do the trick.

@DFurnes
Copy link
Contributor

DFurnes commented Jun 2, 2014

Looks good! 👍

desmondmorris added a commit that referenced this pull request Jun 2, 2014
@desmondmorris desmondmorris merged commit 3a43688 into DoSomethingArchive:dev Jun 2, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Make footer links customizable

4 participants