Does anyone know how I may add a button to every node within a Content Type, which will have the title "Set as my Startup Node"?
The button will give each USER the ability to choose for themselves which node they would like to be sent to after login.

Comments

Anonymous’s picture

I think it's necessary to develop a small custom module to do this. At least that's how I'd solve it. What version of Drupal are you using?

selindoe’s picture

7-something. Latest 7 I guess.

ayesh’s picture

You'll have to invest some way to store this front page's URL for each user as well.

If you have content profile or core profiles, try Rules and Rules Link module.
You can have URLs such http://example.com/node/34/sethome using Rules Link, and once users confirm, let users store the current node ID in each user's profile or content profile.

Then, again using Rules, you can trigger a Rule on event user log in, and in that View, load the path and then redirect to that path.

Anonymous’s picture

You could use Rules to provide the mechanism to look up the stored value for the user's home page and then redirect them to it, but I think it would be more work to create the custom rule in your code than to just provide the redirect in a custom function. If there was some other existing solution that took care of providing the button and storing the home page value, then I'd agree that creating a custom Rule would be a great idea.

@selindoe Do you have any experience coding PHP and/or Drupal modules?

ayesh’s picture

If there was some other existing solution that took care of providing the button and storing the home page value

Actually Rules Link module does this.
But storing the path should be done separately.

selindoe’s picture

@douggough No, I don't have any experience coding PHP and/or Drupal modules.
I've tried HTML, some JAVA/JSP and C-programming for hardware. So I have some knowledge of the Object Oriented way of thinking.

Is Drupal coding difficult?

selindoe’s picture

What is the difference between Content Profiles and Core Profiles?

Do I need both Rules and Rules Link, or just one of them?

Thanks for all the response btw!

selindoe’s picture

I've actually on my way to a solution:

Rules/Rules Link : Redirecting after login
Profile2 : Home Node Reference field for User Object

Tomorrow I'll work on making a button on each of the nodes, assigning it to the users Home Node Reference.

Yey!

Anonymous’s picture

Cool! I'd like to know the details once you've got it worked out. That's what I love about Drupal. There are so many ways to be creative and come up with a solution.