drupal-views

How can I redirect a Drupal user after they create new content

*爱你&永不变心* 提交于 2019-12-06 16:00:02
问题 I want to redirect my users after they create a piece of new content, instead of directing them to the 'view' page for the content. I have seen mention of using hook_alter or something, but I'm really new to drupal and not even sure what that means? Thanks! 回答1: As you mention that you are new to Drupal, I'd suggest to take a look at the Rules module. You can add a trigger on for content has been saved/updated and add an action, to redirect the user to a specific page. You can however do the

How to just show NodeQueue block on included nodes?

ε祈祈猫儿з 提交于 2019-12-06 14:40:44
On my blog I have a series of posts on a common subject that I'd like to link together with a common navigation block, so that readers can easily jump forwards or backwards through the series. I've used NodeQueue to collect all the blog entries together in sequence. Putting the associated block in my sidebar gives me the navigation that I want BUT the block appears on every page of my site. What I want to do is limit the visibility of the block so that it only appears on pages that are included in the queue. How can I do this? I know that NodeQueue creates it's blocks using Views , so I guess

dynamic view by date arguments in drupal 7

a 夏天 提交于 2019-12-06 13:27:28
I'm new to drupal, currently im stuck with this problem. I want to create a article view ("tip of the day") wherein the content of the will automatically changed accordingly. The default value would be the current date. For example: http://localhost/test this will get the current date as the default filter. If no items found it will give no results found. when i go to http://localhost/test/20111220 the view will automatically get the value of the date parameter in the url and output the content on that date. How can I achieved this? Any thoughts or ideas there? Thank you. If you are using

Drupal login form customize

你说的曾经没有我的故事 提交于 2019-12-06 12:19:04
问题 Hi i have used this code <?php $elements = drupal_get_form("user_login"); $form = drupal_render($elements); echo $form; ?> to get the default Drupal login form for my site but I need to customize the HTML, I have found some pages in module/users but did not understand how to customize the structure. 回答1: use this in template.php function themename_theme() { $items = array(); $items['user_login'] = array( 'render element' => 'form', 'path' => drupal_get_path('theme', 'corporateclean') . '

How do I add custom fields in a view?

女生的网名这么多〃 提交于 2019-12-06 10:47:46
I have created a view in Drupal 7, and used "Table" as format. How can I add my own fields to that table? One method is, in your view, click 'add' for fields, then filter by 'Global', and you will get 4 types of custom fields to add. Global: Contextual Links Global: Custom text Global: Math expression Global: View result counter Another method is to make use of Views Custom Field module. 来源: https://stackoverflow.com/questions/15162343/how-do-i-add-custom-fields-in-a-view

Is it possible to change order of attachment views to drupal page view?

本小妞迷上赌 提交于 2019-12-06 09:20:43
I have a view with a page display that contains essentially content A, that content exists in one column. in addition, I've got another 6 attachment displays that display content B,C,D,E, etc. in another column. Is it possible to modify the order of the the attached view displays? Right now i've got them all set to attach after Content A Page. I am not 100% sure I understand what you are asking. So what I think you are trying to do is have a page with a view, then multiple views attached to the page view and you want to be able to move those attached view around. What I recommend Use this

How can I redirect a Drupal user after they create new content

拜拜、爱过 提交于 2019-12-04 21:09:18
I want to redirect my users after they create a piece of new content, instead of directing them to the 'view' page for the content. I have seen mention of using hook_alter or something, but I'm really new to drupal and not even sure what that means? Thanks! As you mention that you are new to Drupal, I'd suggest to take a look at the Rules module . You can add a trigger on for content has been saved/updated and add an action, to redirect the user to a specific page. You can however do the same in a light weight custom module using a form_alter hook. First, find the form ID of the form. For node

Drupal login form customize

好久不见. 提交于 2019-12-04 19:35:35
Hi i have used this code <?php $elements = drupal_get_form("user_login"); $form = drupal_render($elements); echo $form; ?> to get the default Drupal login form for my site but I need to customize the HTML, I have found some pages in module/users but did not understand how to customize the structure. use this in template.php function themename_theme() { $items = array(); $items['user_login'] = array( 'render element' => 'form', 'path' => drupal_get_path('theme', 'corporateclean') . '/templates', 'template' => 'user-login', ); and create a template folder and within that create a file user-login

Drupal Views display newest content per taxonomy limit to one node

扶醉桌前 提交于 2019-12-04 17:57:05
I want to create a view where all 5 of my taxonomy terms are displayed and it then displays the latest node published but this is limited by 1. For Example: Tax Term 1 Latest node published Tax Term 2 Latest node published etc etc Currently I'm grouping by taxonomy term so it's displaying all nodes published then sorted by published date desc. I can't quite figure out how to limit the nodes to only show one item per taxonomy term. Any help would be greatly appreciated. This is possible with Views 3. I've tested this on D7, but should work on D6 also. Add a new view of type - Taxonomy terms Add

Add Table Join, Where, and Order By to Views Query in views_query_alter()

血红的双手。 提交于 2019-12-04 13:34:26
问题 I am trying to modify the query for Views in Drupal (Views version 3, Drupal version 7). What I want to do is change the query prior to running such that it LEFT JOINs a table in which I have weights assigned to the nodes. If I was to write the query I want in SQL, it would look like this: SELECT a.nid, a.title, a.description FROM node a LEFT OUTER JOIN node_weights b ON a.nid = b.nid WHERE b.uid = $uid ORDER BY b.weight DESC This query works like a champ when I run it in the query analyzer.