problem with Apache, mod_rewrite, Drupal in a subdirectory and wanting to hide it

Hi there. I'm setting up a new install of Drupal 7 and have run into a problem with Drupal trying to get request URLs from Apache. I want to keep the drupal files together in their own directory, but I don't want the URLs generated by Drupal to have '/drupal7' on the front.

public_html/.htaccess:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* /drupal7/$0 [last]

With this setup, going to http://example.com/taxonomy/3 correctly serves me a page as if I had gone to http://example.com/drupal7/taxonomy/3; so far so good. However, the links on that page all have /drupal7 on the beginning. In order to prevent that, I did the following:

public_html/drupal7/sites/default/settings.php:

$base_url = 'http://example.com';

Now the generated links look correct: http://example.com/taxonomy/3, but there is a problem when I actually follow one of them: I get a 404 error! When I look at the 'Recent log messages' report, I see a 'page not found' log entry for the following message: 'term/3'. It seems that the first 9 characters of the request path have been stripped.

I solved this by monkey-patching the request_path function like so:

Drupal 7 Adding body class or ID based on Taxonomy term

I'm building a custom theme in Drupal 7 which allows for the creations distinct main sections. Each section is comprised of pages that share common design elements (main banner, specific couloured gradient behind sub-navigation, colour of headlines and sub-heads, etc...). I was planning to use a taxonomy vocabulary called "Section" to allow author/editor users to create pages and assign them a section with a taxonomy drop down whenever a new page was added.

In Drupal 6 I would use THEME-NAME_preprocess_page(&$args) {} in template.php to grab the taxonomy term and add a variable that I could then use in my page.tpl.php to assign to the body tag however this doesn't seem to be possible and although I have tried many different methods of preprocessing, I can't seem to readily add any variables to my page.tpl.php or node.tpl.php.

I've discovered some of the changes in theming Drupal 7 and am happy to change my theming practices, I just need some direction and although the documentation indicates we can use a variable called $terms to grab Taxonomy within the template, that doesn't seem to exist in the scope of the page.

Any tips, direction, links for further ready would be greatly appreciated.

Thanks,
Andrew

Looking for a theme to purchase

I am looking for a theme for a news type site I am starting. I could build the theme from scratch, but I want something to get the site started as I work on creating a custom theme over time.

Would prefer it to be compatible with Drupal 7.

Any ideas where I might purchase such a theme are appreciated.

Drupal Developer

Growing Opportunity for a Highly-Skilled Drupal Developer
We’re a niche social networking start-up with a strong focus on art and design. We’re looking for a highly skilled and reliable Drupal developer who can quickly takeover the technical development and launch of our incomplete Drupal platform. The ultimate goal is to find someone who can become part of our core start-up team and lead all post-launch development of new features, even if only on a part-time consultant basis. To get there from here, we need you to prove your Drupal chops on a short project that adds a small set of incremental functionality to our existing codebase. If you perform well on this project; wow us with your creativity, drive, and big-picture thinking; have some fun with us; and want to keep it going; then more work will follow immediately and we just might change the world together.

If you’re interested and meet the following qualifications, we’d love to talk with you:

• Motivated self-starter
• Strong analytical and critical thinking skills
• Strong verbal and documentation skills (training experience a plus)
• Drupal module contributor with 3+ years of Drupal development experience
• Strong knowledge of custom module development and hooks
• Strong knowledge of theming, pre-process functions, and template/function overrides

how to lay out a custom content type

hi , my first post at drupal.org . I'm pretty new to drupal , and I'm amazed by the power of it . for my first practice I decided to build one of my favorite blogs , rogerebert.com . I decided to add a new content type for movie reviews called "review" and I gave it five fields . title, image,rating(using a star rating module) , writer , and body . it worked fine and as I expected , but I wanna know if I can manage the layout of my content type . I mean by default all of my fields are left aligned , but I want them to be center aligned with each other .

can I keep settings.php from Drupal 6 in new Drupal 7?

I changed core files and could not access update.php.

So I am wondering now if I should keep settings.php from Drupal 6 in new Drupal 7? or maybe I should delete old settings.php of D6, copy default.settings.php of D7 and rename it to obtain new settings.php.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x