Associating a new context (for a section front) with a theme

Events happening in the community are now at Drupal community events on www.drupal.org.
Tran's picture

I am trying to make unique section front pages to replace the article landing pages as a I develop my site.
This is important for user-friendliness, as well as monetizing the site.
A funeral home might want the ability to advertise on the obituary page but not the sports page. A loud sports bar advertisement might not work so well on the obituary page.
But right now, the way I have the site set up, there really isn't a way to differentiate between the various section landing pages.
I have started working on the sports section. I have cloned the frontpage theme and called it sportspage theme. I have cloned the front page context and edited it to fit my needs for a sports section.
I've started adding the blocks. Some blocks show up. But unfortunately, the theme is still the old landing page theme.

How do I force my page to adopt the new theme?

Comments

If you get the landing page

ithacaindy's picture

If you get the landing page issue resolved, many of us (particularly myself) would be interested in a run-down of how it is done.

I followed all your threads

Tran's picture

But didn't see a solution reached, so I thought I would ask again.
I've looked through the OP docs and checked context but not found anything that seems to work..

I suppose I could create a subtheme and then link that through my view. But then, I suppose, I'd be in the same situation, attempting to link the view/theme to the context,

I tried the custompage route

Tran's picture

It seemed promising ... but once I got to the end of the process, I still had a two-column page. And it was messy, too.
I created the page, entered the title/key/path ... i changed the path. I updated my tpl file to match the key.
But in the end, it doesn't recognize the three column page.

Now, I am looking though the front page tpl file and I don;'t see anything that would even suggest why it's three columns?

Where is the file that sets the front page theme?

It's great that you have

Tran's picture

It's great that you have webinars and all. It's nice that this is introduced at DrupalCon.

But seriously, OP users have issues every day that are never addressed
Section Front Pages, for example. This has come up over and over and over and over again. And we are getting no response from the OP maintainers.
Even when someone suggested an OP BUG prevented a solution.

http://groups.drupal.org/node/91579
http://groups.drupal.org/node/88719
http://groups.drupal.org/node/69153
http://groups.drupal.org/node/65823
http://groups.drupal.org/node/65668
http://groups.drupal.org/node/65828
http://groups.drupal.org/node/65808
http://groups.drupal.org/node/66698
http://groups.drupal.org/node/65998
http://groups.drupal.org/node/65798
http://groups.drupal.org/node/65993
http://groups.drupal.org/node/65813

Through all these, there was only one response from an OP maintainer.
"The problem is with regions. My ultimate goal is to turn the frontpage context in a section context, replacing the sitewide context."

Does this mean that contexts can not be used to create section landing pages?

I think they can be, but it

resveld's picture

I think they can be, but it needs to be rendered in your template.php.
There's some examples for OG groups pictures around I know of.

Maybe someone@phase2 can answer?

@midek, OpenPublish is an

irakli's picture

@midek,

OpenPublish is an open-source project. We are trying to provide the foundation for building online news sites in Drupal that allows people to start at a higher level than with the vanilla Drupal core. It is not an out-of-the-box solution that can solve every specific need.

At the same time, we do try to help people adopt it by participating in group discussions. And we consistently release new versions of Openpublish that often address community concerns. However, it's impossible for us to answer every specific implementation question. The resources needed for that just are not available. Neither do we necessarily know a ready-to-use answer to every question off of our heads. But that's where the power of the open-source community lies and why we created this group - so we are not the only ones trying to answer the questions. If somebody else, who uses OP, has run into similar question and has found a solution to the problem, this is where they can share it with the community (and hope for the same from the community next time around).

This is how Drupal works. This is how OpenPublish works, too.

As for your specific question: I am not sure I fully understand your requirements, but from what I hear, it looks like you expect more from Context that it can really provide. The logic of serving ads should be in separate code. You may need some kind of ad-management code or you will have to write a custom Context condition, if you need custom logic. That's not necessarily a thing Context can handle out of the box.

Thank you

.............................................
http://twitter.com/inadarei

Thank you for answering

Tran's picture

Thank you for your answer. But I still am in the dark on this one.
Why is it asking too much to ask context to do what it already is doing, but to do it on another page?

here here

pixelsweatshop's picture

Well said irakli. I have been getting updates from this group for last couple of weeks and have seen people complaining about the issues in OP. I contemplated writing something, but stuck on the sidelines. just like everything else Drupal, it's community driven. Here is a post i came across the other day that might help to explain to those complaining about OP. It was originally written for module development, but it applies to distros too..

"Perhaps it's the language gap, but your posts are coming across pretty harsh. Or, maybe you're just figuring out how parts of the Drupal space actually works and you're frustrated by it. That's understandable - it's tough realizing that Drupal isn't actually run by a team of tireless developers with infinite patience and no bills to pay - and I don't mind bearing the brunt of your frustration if I can help you and other folks in your shoes come to terms with a more accurate perspective.

From a user's point of view, in the ideal world every developer would have the time and desire to regularly pummel their issue queues into submission (like some people). In the developer's world, things look a little different. Most of us have enough going on that we have to prioritize what gets done, and that depends on a huge number of factors, including but not limited to:

* Can the module / community work be integrated into client work? (i.e. killing two birds with one stone)
* What kind of time is there beyond client work (i.e. bill-paying work) is there to work on other projects?
* Out of the numerous projects that you have on your plate, which ones are the most important strategically in getting you closer to your longer-term goals?
* How many people will be affected by your work?
* Who are the people will be affected by your work?
* How educational or exciting is the work going to be?

I may be speaking just for myself, but I'm not positively influenced by how upset a single community user gets about poor support. That sort of reaction means that the user probably has some other pressures in their life impacting their overall happiness and they aren't going to get an awful lot happier through you responding to their demands. So posts like yours above beget the opposite reaction to what you were probably hoping for. I'm actually less enthusiastic about tackling the issues you mentioned, not out of spite, but just because I can't help but get a little bummed out.

Each module on Drupal.org has a backstory, and some of those stories involve a developer who actually is tireless and is doing this work only because of a pure desire to make Drupal better and push their own skills, and it's this focus that allows them to put a strong focus on supporting the module, regardless of who asks or what they're getting paid.

There are other situations where a developer creates a module because they are asked to do so for a client - as with this particular module. What I was actually asked for was a particular feature, and upon my suggestion the client generously agreed to sponsor the extra time that would be required to make the feature modular and share it on Drupal.org - i.e. they understood the value of sharing. I wouldn't have built this module without the financial support because I don't have enough use cases to justify the time required. So my motives are around making the client happy while sharing as much of the work as I can with others.

Now here's the next part of the equation, which is where you come in. You found a good use case for the module - which is great, but doesn't mean that it changes how or when I can work on it. Because the code is open source and free to use, however, you now have the ability to actually go in and fix those problems you've found, or find someone who has the skill set to do so. You're free! You're not beholden to my currently limited ability to offer support, you can actually take action and get something done. And I'd say that in contrast to what you suggested Drupal was all about, that this is a lot closer. It's people doing what they can, when they can, as they need to, and sharing it all.

Good luck!

mea culpa. I did not mean to

Tran's picture

mea culpa.
I did not mean to come across as harsh as I did.

try context taxonomy

pixelsweatshop's picture

As Irakli suggested, try using taxonomy to "categorize" your "landing pages" then use the taxonomy selection available in context to display your ads accordingly

How would that force a

Tran's picture

How would that force a three-column page?

You still sound like a

ksweet's picture

You still sound like a demanding customer who is paying OP developers for their time. It's understandable that you're frustrated, but I guarantee you that your attitude is doing more to prevent people from helping you.

People are helping you for free. Companies pay consultants over $50 an hour to do what random people you've never met are doing for free here. Nobody owes us anything.

Your last comment:

"How would that force a three-column page?"

Consider this approach:

"I'm sorry, but I still don't understand how I can create a three-column page. Can you elaborate, please?"

Courtesy goes a long way in the open source community.

Also, like irakli pointed out, many of the questions you have relate to modules that have nothing to do with OP. This thread would make more sense if it were in a group / forum for the Context module. Google searches on the the module in question will almost certainly benefit you more than asking in this group and getting frustrated by the lack of responses. I'd bet a nickel the maintainers of Context would be able to tell you quickly if what you're trying to do is possible with their module.

~Kevin

I had a direct question and

Tran's picture

I had a direct question and felt no inclnation to insincerely apologize before asking.

As for the issue at hand, I have google and drupal searched it (google searches are more productive than drupal searches). Again, my lack of knowledge makes it difficult to pin down the problem with any precision.

The issue, I don't believe is with context. Context is doing what I am asking. The problem is that the context is associating with the standard theme.

I would like to somehow override that standard OP theme to create new pages in modeled after the front page. And then, I would like to use context to create that page, the way I do with the front page.

This, I am learning slowly, is not easy.I did pick up a couple ideas for this in on the drupal/newspapers group.

I thank people who've patiently put up with my ignorant questions. And I do apologize for sounding like an irate customer. Especially to the maintainers. However, as a community, OP needs to do a better job answering questions. Far too many drift off into the nether and are never solved. And when this happens, you lose users. As I've seen. However, this does not excuse my petulance.

I do plan to recommend OP in a letter to a National Newspaper Association trade newspaper columnist. There are two things at work with OP.
For the big publications who can hire a talented themer and drupal guy, you have distribution that you can showcase.
But for the small, mom-and pop three-person newspapers looking for smart, prettymuch out of the box content management, this is a godsend.
I think it's important to serve both markets, and that's going to mean lots of dumb questions from people learning a new way of thinking.

@midek, you can change the

irakli's picture

@midek,

you can change the layout by creating a custom context layout that would be triggered by some condition. Now if you want to have custom logic for when that condition should trigger you will have to write some code to implement a Context condition.

Hope that helps.

.............................................
http://twitter.com/inadarei

Thank you. I was afraid you

Tran's picture

Thank you. I was afraid you would say it involved writing code.
Irakli, does what you said relate at all to what this guy suggests?
http://groups.drupal.org/node/21539#comment-74593

I am going to stare very hard at what you wrote for awhile until it makes sense to me.
Thanks again.

Midek, I think what you

resveld's picture

Midek,

I think what you need/want is outlined here: http://drupalcode.org/viewvc/drupal/contributions/modules/context/contex...
It explains what a theme needs to do the trick for you.

This way, you can write your own OP subtheme to make it work I think

-Ronald

Maybe this helps ...

fk77388's picture

I have not tested this solution, but it may help.

Using OpenX ad server with this Drupal module: http://drupal.org/project/openx
OpenX will be a separate installation from Drupal, and of course needs to be configured (the plus side, you will know how many times an ad appeared from a network or specific advertiser, you'll have the ability to provide statistics to your customers).
You can manage the OpenX server from within Drupal using this module: http://drupal.org/project/openx_manager

To insert and manage different ads on different nodes, you can use:
multiblock module at: http://drupal.org/project/multiblock

To help in customizing some of your pages like the front page, this module may help:
http://drupal.org/project/nodesinblock

All the best.

OpenPublish

Group organizers

Group categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: