Views, arguments and pathauto URLs

Hi -

I have a CCK content type 'Person' which displays on a Pathauto aliased URL thus:

http://[domain]/person/John-Smith

I have also created a Block View to display under the main content. The Block View pulls in other fields one of which is a Taxonomy Name. I need to pull the 'John-Smith' from the URL, strip out the '-' and then filter the Block View with 'John Smith' against the Taxonomy Name. This is proving impossible.

Any ideas greatly received. Thanks.

add field widget to given field

HI there,

how to add a widget to a given field? I want to at it to the field "file".

Have I to use hook_field_info_alter(&$info) ?

Meta Tags in drupal 7

Hi everybody.

I was not happy with any of the solution for getting meta tags in drupal 7. Even the modules out there are not yet fully functional.
So i create some code my self to get this in my site. I would like to share what i have done.

First i created a new content type called Meta tags. This content type consists of

title : Used for the URL of the page where you want to add the meta tags to , no base path allowed.
field_meta_description : Used for the meta tag description you only put the description in here no formatting.
field_meta_keywords : Used for the meta tag keywords you only put the keywords separated by a comma in here no formatting.

Then i created a custom theme and copied the html.tpl.php to there. ( You can also move it to the theme you already use )
I edited this template from the following lines

<head profile="<?php print $grddl_profile; ?>">
<?php print $head; ?>

to this


print $grddl_profile;
">

<?php
// start custome code for the meta tags.
// meta tags are set in a node type meta_tags
// the title has to be the last part of the url
// if the url is not found the stanaard text is used.

$url = $_GET['q'];

How to set user login block to only show up for admins

Hello,
I want to effectively hide the user login block from visitors to the site and only make it available for administrators but I can't seem to get it right.

I had disabled the User login block in hopes that it would only show up when someone tried to login as a user (http://www.thrivinginlife.org/?q=admin).

My client was able to click on the link I sent him and login as an admin no problem. But when I tried to login on my laptop to help walk him through adding some content, I kept getting the "Access Denied" page. When I got home, I tried to log in on Firefox and got the "Access denied" page.

Luckily, I'm currently logged in on a browser on my desktop at home on Safari because I haven't logged out since I first started building the site a few days ago. Since I was still logged in on Safari, I moved the login block back on to the page and set it for Administrators only and had the same problem.

I changed it to all users and set it to only show up on the "?q=admin" page and only get the "Access Denied" page again.

If I set the block to be available for all users and only on the "front" page it still wont show up on the ...?q=admin page but then it does show up for anyone visiting the homepage of the site.

Any ideas?

Creating custom style for single menu

Hi,

I am currently building a theme for a new Drupal7 installation.
I created two extra regions in the theme, but that shouldn't be the problem.

Now I want to show a custom created menu in one of the regions, that's also working:
I click structure, blocks, and add the menu I created to the region I want it to be in.

But now; our designer came up with his very own style for that menu. Only that menu should be styled that way: The link items are completely differently styled, and the "container div" (the block self) has some fancy borders.

how to display cck field on front page and taxonomy page?

every body
My English is very disappointing.

my problem:

in Front page and taxonomy page,drupal 7 default display title and body field, I want to display my custom cck field, how can I do ?
please don't use views!

thank you!

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x