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

Filter news based on campaign or site news #39

Open
atticoos opened this issue Aug 15, 2015 · 6 comments
Open

Filter news based on campaign or site news #39

atticoos opened this issue Aug 15, 2015 · 6 comments
Assignees
Milestone

Comments

@atticoos
Copy link
Contributor

Allow an easy switch between campaign news and site news. Perhaps put the first 3 site news articles at the top.. Or maybe 2 columns, one for each?

Sites are going to post less frequently than daily campaign posts, so they will get lost FAST.

I'm all for the 2 columns actually

@atticoos atticoos added this to the v1.1.0 milestone Sep 4, 2015
@atticoos
Copy link
Contributor Author

atticoos commented Sep 4, 2015

I vote for columns here

@jasonbraun
Copy link
Member

I agree, two columns would be most effective, each one titled "Campaign News" and "Site News" or something like that. I'll work on this next. One question is, would the Site News be blog posts from within WordPress or where would we grab the feed from?

@atticoos
Copy link
Contributor Author

atticoos commented Sep 6, 2015

Yessir -- posts from WP

@atticoos
Copy link
Contributor Author

atticoos commented Sep 7, 2015

Wanted to drop a note on how this is set up, as it's not using the conventional WP Loop:

So over in the news template, home.php, we get the posts by calling the $newsFeedService->getNewsFeed

This gives us a combined collection of the remote & local news.

To get them individually, you can separate the two collections like so:

$newsFeedService = new NewsFeedService();
$localNews = $newsFeedService->getLocalNewsFeed();
$remoteNews = $newsFeedService->remoteNewsFeedService->getFeed();

The news articles both share a common interface, and you can see in the template how they're used

@jasonbraun
Copy link
Member

Thanks for clarifying this, I was looking at everything and trying to figure out what was going on there. I am a little unfamiliar with doing it this way but it makes sense. And since we're doing this is on home.php this will be the default news layout with two columns.

Another question, which column is most important - Site or Campaign? Site news first on the left? would end up on top on mobile. Then campaign on the right, which would end up on the bottom on mobile.

@atticoos
Copy link
Contributor Author

atticoos commented Sep 7, 2015

In previous conversations we had decided that the Site would be the priority content.

So basically,

Site news first on the left? would end up on top on mobile. Then campaign on the right, which would end up on the bottom on mobile.

Is exactly on point.

@atticoos atticoos self-assigned this Sep 25, 2015
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

2 participants