I have already created the site already and have used the jobsearch module and CCK. I have a few questions.

1)I have a created a resume CCK. Is it possible that a user can only have one resume?
2)I have created a custom navigation block for the user. How can I let them see and change their user profile.

Thanks

Comments

Anonymous’s picture

To limit a CCK per user, you can try the 'Node - limit number' module :

http://drupal.org/project/node_limitnumber (only on 5 though....)

And for the user block, you can use two things :

- the drupal menu item 'my account'

- this PHP snippets...

	<h3><?php print l($user->name, 'user/' . $user->uid) ?></h3>
	<ul>
		<li><?php print l('My Account' , 'user/' . $user->uid )?></li>
		<li><?php print l('Account Settings' , 'user/' . $user->uid . '/edit') ?></li>
		<li><a href="/logout">Log Out</a></li>
	</ul>

drop this into a block with PHP filter, it'll create a block with the Connected User's name, a link to his account, a link to edit the account, and a logout link.

Does this helps ?

______________________________

www.raincitystudios.com

joemer’s picture

Thanks :)

joemer’s picture

I have used the node limiter. Is it possible that I could know if a user already have created a Resume so that the link for creating a Resume would be disabled for him already and be replaced by an edit resume instead. Thanks.

Anonymous’s picture

That's a little bit more tricky, so far, I see few possible solutions :

- have a look at tis module : http://drupal.org/project/automenu ... not sure but it's worth the try

- The second one, more complicated, would be to create two roles : one is a user that didn't create a cv yet, and one that already created a CV. You could use then the user points module combined with the User points contrib to move the user from a role to another depending on wether they submited a CV or deleted it.
the modules :
http://drupal.org/project/userpoints
http://drupal.org/project/userpoints_contrib

- Third solution the best imho, take the menu entry off, and use VIEWS to build a block that filters the user's CV (as there is only one, it'll be the only one user's CV). then use the wizard to create a specific template for this view, and instead of displaying the CV, only add a link to edit the CV (something like node/(node id)/edit). And in the view config, in the empty text box, create a link to create a new CV (node/add/cv...). So if the user doesn't have a CV, he'll see a link to create one, and if he has one, he'll see a link to edit it. The good thing about this solution is that you have a total control over the html output, so it's super flexible for theming. And if the user delete his cv, he's back with the 'create' link.

http://drupal.org/project/views

and you can add the snippet i gave you earlier in the views template, so it'll be all together.

I love VIEWS.. there is always a solution with views :)
______________________________

www.raincitystudios.com

joemer’s picture

Thanks, I'll try it out.