For example, you want a different a different context for /sports you need to create a file called page-sports.tpl.php
In that you should be able to set it to 3 column there.
Interesting. I want all menu items going to a three-column landing page that mimics the front page. For instance, I would have a landing page for "sports", "entertainment", "opinions", etc. I would reserve the default listing page for searches and archives.
In order to change all menu items to a three-column landing page, how would I change the page.tpl.php?
You can use the context clone function. Then create a condition for that cloned context to the path, yoursite.com/sports for example (or sports). You can now have a context that is just like that front page which triggers at yoursite.com/sports. The problem now is the theme because page-front.tpl.php is called for the front page. My guess is that you can leverage the CustomPage module to do this. The instructions seems easy enough to follow. http://drupal.org/node/286219 So if you make a duplicate of page-front.tpl.php and rename it to sports.tpl.php it should work with a little bit of configuration. Then you should configure the custom page at /admin/build/custompage/add. Title: Sports | Key: sports | Path: sports . So now you will have a duplicate of of the front page template triggered at yoursite.com/sports and the path as a context condition will trigger all the blocks in the cloned front page context now named sports.
Now you are going to need taxonomy to classify the content. The taxonomy terms will have to be the same spelling as the word in the URL which in this example is sports. Whatever word comes after the / in yoursite.com/ is the first argument. You can use this in your view to create an argument condition. So if you have a vocabulary called Sections with four taxonomy terms sports, local, college, politics you can use the views argument to sort all the content that was tagged during node creation to sort and only show that content. So each block that shows on the sports page will need that argument configured in views also.
Interesting walk-through. Let's break it down a bit. I cloned the "frontpage" context, renamed it "sports_landing." I think replaced the front path trigger with mysite.com/articles/sports. I try to trigger it by hitting the "Sports" menu item and I still get the articles listing page, not the frontpage. Am I missing a step?
I haven't actually done it. But, that would be my first guess to one way of doing it. I'm going to give it a try before I get in trouble leading people down the wrong road :)
Basically, everything I wrote above works except the Custom Page module outputs through the $content variable AND OpenPublish does not allow Drupal to recognize the normal naming convention for tpl.php files. Drupal doesn't recognize them at all which makes this a bug. I thought that they were substituting the Custom Page module. You also need to add the css class front-page to the body using the context.
It's not a big deal since you can use logic in the page.tpl.php file to test if it's a landing page and only print the $content variable and skip everything else otherwise print all other stuff.
I'm not going to do that now since the developers of OP should fix the bug. If they don't and you are pushed for time I'll hack something together for you.
Step #1 is complete: I cloned the frontpage context, copied page.tpl.php to sports.tpl.php and created a custom page, using the sports key and url. Now, when I enter "mysite.com/sports" I get a different page.
However, this is where I get stuck. The context doesn't trigger any of the frontpage elements - no sidebars even appear. Also, the page title (along with the 'share' and 'print' buttons) display twice.
Actually, the problem is BUG in the OpenPublish system. The developers did something that prevents Drupal from recognizing page-sports.tpl.php so it is not used at yoursite.com/sports.
It first I thought the CustomPage module is used but that puts out the information through the $content variable which in the page.tpl.php file has a ton of stuff surrounding it.
Before I go ahead and start hacking things I thought I would pose the question to the general Drupal community because what I thought would work doesn't. http://drupal.org/node/794166
Any movement on this topic? (I noticed there were no replies to the Drupal support question.) I'd like to create a page like TNR.com, which uses a three-column display for their blogs. I can accomplish a two-column display, with my blog context, but when I try to emulate the front page (by cloning the frontpage context) using the "left", "right" and "on top of content" sections, I get the left sidebar, the on top of content, and then, lower on the page, the right sidebar content appears. Here is how it looks on my site.
Thats just a column width issue - you are trying to fit over 1200px into a width of 980px. Change the width of body.sidebars #center to anything less than 330px and it should be fine.
Thanks. Let me see if I understand: The reason why the taxonomy won't fit in the center column is that the #center css is too wide? My goal is to have inside landing pages in the same format as the front page, e.g. left-column: articles, center-column: content, right-column: ads/promos.
Is there a step by step method?
I've cloned the front page.
I've cleared out the old blocks and replaced them with the ones I want.
I've reset the
and called it page-sportspage.tpl.php
i've changed the page/view path
Whatever I've done has worked. But I need to find away to tell the site to adopt the page-sportspage.tpl.php style.
Comments
depends on what link you want
depends on what link you want it to be actually.
For example, you want a different a different context for /sports you need to create a file called page-sports.tpl.php
In that you should be able to set it to 3 column there.
You can check this link also: http://drupal.org/node/46027
After that, you can create a new context
Ronald
Interesting. I want all menu
Interesting. I want all menu items going to a three-column landing page that mimics the front page. For instance, I would have a landing page for "sports", "entertainment", "opinions", etc. I would reserve the default listing page for searches and archives.
In order to change all menu items to a three-column landing page, how would I change the page.tpl.php?
you can set different options
you can set different options based on taxonomy i think.
It requires you to change page.tpl.php and create own page-xxxx.tpl.php files
You can use the context clone
You can use the context clone function. Then create a condition for that cloned context to the path, yoursite.com/sports for example (or sports). You can now have a context that is just like that front page which triggers at yoursite.com/sports. The problem now is the theme because page-front.tpl.php is called for the front page. My guess is that you can leverage the CustomPage module to do this. The instructions seems easy enough to follow. http://drupal.org/node/286219 So if you make a duplicate of page-front.tpl.php and rename it to sports.tpl.php it should work with a little bit of configuration. Then you should configure the custom page at /admin/build/custompage/add. Title: Sports | Key: sports | Path: sports . So now you will have a duplicate of of the front page template triggered at yoursite.com/sports and the path as a context condition will trigger all the blocks in the cloned front page context now named sports.
Now you are going to need taxonomy to classify the content. The taxonomy terms will have to be the same spelling as the word in the URL which in this example is sports. Whatever word comes after the / in yoursite.com/ is the first argument. You can use this in your view to create an argument condition. So if you have a vocabulary called Sections with four taxonomy terms sports, local, college, politics you can use the views argument to sort all the content that was tagged during node creation to sort and only show that content. So each block that shows on the sports page will need that argument configured in views also.
Marine job board with Drupal 7 at http://windwardjobs.com
Interesting walk-through.
Interesting walk-through. Let's break it down a bit. I cloned the "frontpage" context, renamed it "sports_landing." I think replaced the front path trigger with mysite.com/articles/sports. I try to trigger it by hitting the "Sports" menu item and I still get the articles listing page, not the frontpage. Am I missing a step?
I haven't actually done it.
I haven't actually done it. But, that would be my first guess to one way of doing it. I'm going to give it a try before I get in trouble leading people down the wrong road :)
Marine job board with Drupal 7 at http://windwardjobs.com
Basically, everything I wrote
Basically, everything I wrote above works except the Custom Page module outputs through the $content variable AND OpenPublish does not allow Drupal to recognize the normal naming convention for tpl.php files. Drupal doesn't recognize them at all which makes this a bug. I thought that they were substituting the Custom Page module. You also need to add the css class front-page to the body using the context.
It's not a big deal since you can use logic in the page.tpl.php file to test if it's a landing page and only print the $content variable and skip everything else otherwise print all other stuff.
I'm not going to do that now since the developers of OP should fix the bug. If they don't and you are pushed for time I'll hack something together for you.
Marine job board with Drupal 7 at http://windwardjobs.com
I've Created a Custom Page
Step #1 is complete: I cloned the frontpage context, copied page.tpl.php to sports.tpl.php and created a custom page, using the sports key and url. Now, when I enter "mysite.com/sports" I get a different page.
However, this is where I get stuck. The context doesn't trigger any of the frontpage elements - no sidebars even appear. Also, the page title (along with the 'share' and 'print' buttons) display twice.
Actually, the problem is BUG
Actually, the problem is BUG in the OpenPublish system. The developers did something that prevents Drupal from recognizing page-sports.tpl.php so it is not used at yoursite.com/sports.
It first I thought the CustomPage module is used but that puts out the information through the $content variable which in the page.tpl.php file has a ton of stuff surrounding it.
Marine job board with Drupal 7 at http://windwardjobs.com
Before I go ahead and start
Before I go ahead and start hacking things I thought I would pose the question to the general Drupal community because what I thought would work doesn't. http://drupal.org/node/794166
Marine job board with Drupal 7 at http://windwardjobs.com
Any movement on this topic?
Any movement on this topic? (I noticed there were no replies to the Drupal support question.) I'd like to create a page like TNR.com, which uses a three-column display for their blogs. I can accomplish a two-column display, with my blog context, but when I try to emulate the front page (by cloning the frontpage context) using the "left", "right" and "on top of content" sections, I get the left sidebar, the on top of content, and then, lower on the page, the right sidebar content appears. Here is how it looks on my site.
Thats just a column width
Thats just a column width issue - you are trying to fit over 1200px into a width of 980px. Change the width of body.sidebars #center to anything less than 330px and it should be fine.
Thanks. Let me see if I
Thanks. Let me see if I understand: The reason why the taxonomy won't fit in the center column is that the #center css is too wide? My goal is to have inside landing pages in the same format as the front page, e.g. left-column: articles, center-column: content, right-column: ads/promos.
I finally got around to trying this
Is there a step by step method?
I've cloned the front page.
I've cleared out the old blocks and replaced them with the ones I want.
I've reset the
and called it page-sportspage.tpl.php
i've changed the page/view path
Whatever I've done has worked. But I need to find away to tell the site to adopt the page-sportspage.tpl.php style.