3 added 653 characters in body
source | link

This is a theming question and there's a choice to be made about whether to use a Views or a node template. By and large when displaying entities in views, I tend to use a particular view mode, because then I can display them similarly outside of Views if necessary. To do that:

  1. Choose which view mode to use. In your case use the Teaser view mode, or if that's not an option create a new one.
  2. Ensure your view's configured to display that view mode. For more info, download and install advanced_help, and read from the Views help at least Row styles and its children Fields and Node.
  3. Check in the node template you're using: is there a variable that would let you add a target attribute to the title link? (There isn't in core node.tpl.php but there might be in your theme.) For more info you can read Overriding themable output and Core templates and suggestions. I'd suggest using devel_themer to see what template is actually used - make sure you've done step 2 first. The template should either be node.tpl.php or start with node-- and end .tpl.php.
  4. If there wasn't a variable in step 3, then modify the template to have one, eg. by adding $title_link_attributes.
  5. Implement hook_preprocess_node(). Check if the node is of the correct type and view mode and modify the variable appropriately. (And if you created a new variable, ensure that you set it to the empty string for other view modes and content types to avoid warnings.) For more info, see Setting up variables for use in a template (preprocess and process functions).

Let me know if you have any questions, or if that approach isn't appropriate for any reason.

Btw I gave a non-JS answer because I thought that was a requirement, but now I'm not so sure.

This is a theming question and there's a choice to be made about whether to use a Views or a node template. By and large when displaying entities in views, I tend to use a particular view mode, because then I can display them similarly outside of Views if necessary. To do that:

  1. Choose which view mode to use. In your case use the Teaser view mode, or if that's not an option create a new one.
  2. Ensure your view's configured to display that view mode. For more info, download and install advanced_help, and read from the Views help at least Row styles and its children Fields and Node.
  3. Check in the node template you're using: is there a variable that would let you add a target attribute to the title link? (There isn't in core node.tpl.php but there might be in your theme.) For more info you can read Overriding themable output and Core templates and suggestions. I'd suggest using devel_themer to see what template is actually used - make sure you've done step 2 first. The template should either be node.tpl.php or start with node-- and end .tpl.php.
  4. If there wasn't a variable in step 3, then modify the template to have one, eg. by adding $title_link_attributes.
  5. Implement hook_preprocess_node(). Check if the node is of the correct type and view mode and modify the variable appropriately. (And if you created a new variable, ensure that you set it to the empty string for other view modes and content types to avoid warnings.) For more info, see Setting up variables for use in a template (preprocess and process functions).

Let me know if you have any questions, or if that approach isn't appropriate for any reason.

This is a theming question and there's a choice to be made about whether to use a Views or a node template. By and large when displaying entities in views, I tend to use a particular view mode, because then I can display them similarly outside of Views if necessary. To do that:

  1. Choose which view mode to use. In your case use the Teaser view mode, or if that's not an option create a new one.
  2. Ensure your view's configured to display that view mode. For more info, download and install advanced_help, and read from the Views help at least Row styles and its children Fields and Node.
  3. Check in the node template you're using: is there a variable that would let you add a target attribute to the title link? (There isn't in core node.tpl.php but there might be in your theme.) For more info you can read Overriding themable output and Core templates and suggestions. I'd suggest using devel_themer to see what template is actually used - make sure you've done step 2 first. The template should either be node.tpl.php or start with node-- and end .tpl.php.
  4. If there wasn't a variable in step 3, then modify the template to have one, eg. by adding $title_link_attributes.
  5. Implement hook_preprocess_node(). Check if the node is of the correct type and view mode and modify the variable appropriately. (And if you created a new variable, ensure that you set it to the empty string for other view modes and content types to avoid warnings.) For more info, see Setting up variables for use in a template (preprocess and process functions).

Let me know if you have any questions, or if that approach isn't appropriate for any reason.

Btw I gave a non-JS answer because I thought that was a requirement, but now I'm not so sure.

2 added 653 characters in body
source | link

This is a theming question and there's a choice to be made about whether to use a Views or a node template. By and large when displaying entities in views, I tend to use a particular view mode, because then I can display them similarly outside of Views if necessary. To do that:

  1. Choose which view mode to use. In your case use the Teaser view mode, or if that's not an option create a new one.
  2. Ensure your view's configured to display that view mode. For more info, download and install advanced_help, and read from the Views help at least Row styles and its children Fields and Node.
  3. Check in the node template you're using: is there a variable that would let you add a target attribute to the title link? (There isn't in core node.tpl.php but there might be in your theme.) For more info you can read Overriding themable output and Core templates and suggestions. I'd suggest using devel_themer to see what template is actually used - make sure you've done step 2 first. The template should either be node.tpl.php or start with node-- and end .tpl.php.
  4. If there wasn't a variable in step 3, then modify the template to have one, eg. by adding $title_link_attributes.
  5. Implement hook_preprocess_node(). If the node is of the correct typeCheck if the node is of the correct type and view mode and view mode, modify the variable appropriately. (And if you created a new variable, ensure that you set it to the empty string for other view modes and content types to avoid warnings.) For more info, see Setting up variables for use in a template (preprocess and process functions).

Let me know if you'd like more detailyou have any questions, or if that approach isn't appropriate for any reason.

This is a theming question and there's a choice to be made about whether to use a Views or a node template. By and large when displaying entities in views, I tend to use a particular view mode, because then I can display them similarly outside of Views if necessary. To do that:

  1. Choose which view mode to use. In your case use the Teaser view mode, or if that's not an option create a new one.
  2. Ensure your view's configured to display that view mode.
  3. Check in the node template you're using: is there a variable that would let you add a target attribute to the title link? (There isn't in core node.tpl.php but there might be in your theme.)
  4. If there wasn't a variable in step 3, then modify the template to have one, eg. by adding $title_link_attributes.
  5. Implement hook_preprocess_node(). If the node is of the correct type and view mode, modify the variable appropriately. (And if you created a new variable, ensure that you set it to the empty string for other view modes and content types to avoid warnings.)

Let me know if you'd like more detail, or if that approach isn't appropriate for any reason.

This is a theming question and there's a choice to be made about whether to use a Views or a node template. By and large when displaying entities in views, I tend to use a particular view mode, because then I can display them similarly outside of Views if necessary. To do that:

  1. Choose which view mode to use. In your case use the Teaser view mode, or if that's not an option create a new one.
  2. Ensure your view's configured to display that view mode. For more info, download and install advanced_help, and read from the Views help at least Row styles and its children Fields and Node.
  3. Check in the node template you're using: is there a variable that would let you add a target attribute to the title link? (There isn't in core node.tpl.php but there might be in your theme.) For more info you can read Overriding themable output and Core templates and suggestions. I'd suggest using devel_themer to see what template is actually used - make sure you've done step 2 first. The template should either be node.tpl.php or start with node-- and end .tpl.php.
  4. If there wasn't a variable in step 3, then modify the template to have one, eg. by adding $title_link_attributes.
  5. Implement hook_preprocess_node(). Check if the node is of the correct type and view mode and modify the variable appropriately. (And if you created a new variable, ensure that you set it to the empty string for other view modes and content types to avoid warnings.) For more info, see Setting up variables for use in a template (preprocess and process functions).

Let me know if you have any questions, or if that approach isn't appropriate for any reason.

1
source | link

This is a theming question and there's a choice to be made about whether to use a Views or a node template. By and large when displaying entities in views, I tend to use a particular view mode, because then I can display them similarly outside of Views if necessary. To do that:

  1. Choose which view mode to use. In your case use the Teaser view mode, or if that's not an option create a new one.
  2. Ensure your view's configured to display that view mode.
  3. Check in the node template you're using: is there a variable that would let you add a target attribute to the title link? (There isn't in core node.tpl.php but there might be in your theme.)
  4. If there wasn't a variable in step 3, then modify the template to have one, eg. by adding $title_link_attributes.
  5. Implement hook_preprocess_node(). If the node is of the correct type and view mode, modify the variable appropriately. (And if you created a new variable, ensure that you set it to the empty string for other view modes and content types to avoid warnings.)

Let me know if you'd like more detail, or if that approach isn't appropriate for any reason.