drupal-views

Drupal 8: Mismatched entity and/or field definitions

爱⌒轻易说出口 提交于 2020-01-07 02:25:29
问题 While trying to understand why my view is not displaying, I noticed the following error in the log: I do not think it is possible to delete the URL alias from Taxonomy terms. At least I cannot find how to do this. I have, however gone through ALL of my taxonomy terms and removed the value for this field. I have also done the following with Pathauto: Also, I have checked the report located at admin/reports/fields and can confirm that there are no entities that use a field called URL alias. I

show node title to unregistered users

允我心安 提交于 2020-01-06 08:41:39
问题 I'm using content access module to restrict certain nodes and node types for un-registered users. But I would like to create a view where unregistered users can also see titles of those restricted nodes. How can I do this ? 回答1: I haven't used this personally, but I just saw it pop up in the drupal.org module feed a few days ago, and it should help: http://drupal.org/project/views_ignore_node_permissions 回答2: ok if you just want to echo the node title in php (with in the node body ) enable

Drupal 6: Render Views 2 data in a page tpl file

喜你入骨 提交于 2020-01-05 05:47:11
问题 I think the answer might be obvious but I can't seem to figure it out. How do I render a view I've created in Views 2 (Drupal) in a page-pagename.tpl.file? My thought was that it would be some sort of PHP snippet but I can't find documentation about it. Any thoughts that might steer me in the right direction. 回答1: The solution is here: http://views-help.doc.logrus.com/help/views/embed Also "function" can be replaced with "print" and the additional param brackets can be removed. So it will

Drupal Views exposed filter of Author name

十年热恋 提交于 2020-01-04 09:05:08
问题 I have a view which I would like to add an exposed filter of the author name. So I can filter all the posts created by "John Smith" etc. I can't seem to see it listed under filter. Is this possible to do? 回答1: Under Build > Views ( /admin/build/views ) add a filter (from filter category user ) click Expose in the filter configuration section (near to the right border). 回答2: This is actually a little harder than it sounds. You need to create a "Relationship" to the "Node revision: User", and

Count number of results in a View

不问归期 提交于 2020-01-03 20:04:16
问题 I need to count how many people belong in pre-defined groups (this is easy to do in SQL using the SELECT COUNT statement). My Views query runs fine and displays the actual data in my table, but I simply need to know how many results it found. However there doesn't seem to be a COUNT option in views. I am guessing I am going to have to use some sort of views hook, and then stick the result in the table. Here's a quick example of what i'm trying to achieve: My Table ---------------------- Group

Drupal 7 Views: Which type of output to use for re-render of link

余生颓废 提交于 2019-12-25 05:28:17
问题 When selecting theming information in views what type of output will enable me to re-render the links? The links require title attributes and the views gui is not an option. Display Style Row Field 回答1: Resolved: Used 'Row output' as the theme suggestion and manipulated the $fields variable before looping its properties. 来源: https://stackoverflow.com/questions/10105740/drupal-7-views-which-type-of-output-to-use-for-re-render-of-link

Drupal url alias and views and clear urls for taxonomy issues

不问归期 提交于 2019-12-25 04:42:52
问题 I am using views module. I have created blocks using views and a url using page display. This is for taxonomy. So my views url looks like this "news/science" So if someone click on the link he should be taken to www.example.com/news/science. However i am taken to a unstyled page with broken links. But when i try to use the url www.example.com?q=news/science i am taken to a proper page with correct data. The issue is only with taxonomy related terms. i.e all urls www.example.com/news

Possible pitfalls on a multilingual Drupal site?

帅比萌擦擦* 提交于 2019-12-25 02:44:25
问题 I'm about to embark on a journey to build a multilingual Drupal site, where I will most likely have to use Views, Panels and Taxonomy pretty heaily. I am a bit worried about the new-node-for-every-language approach, especially using Panels. So far I've gotten it to work similarly to what I want by not having multilingual support for the Panels content-type, and fetching content that is from Current language and language neutral . This seem to work as expected, but I'm seeing some problems

drupal 7 views block and contextual filter not working

孤人 提交于 2019-12-24 12:12:05
问题 I'm trying to set a contextual filter for a block type views but when I preview it, it returns nothing... More specifically when I try the same view as a page the Contextual filter is working fine and filtering the content but when I try the view as a block nothing is returned although the "Provide default value" is set as "raw value from url". Any idea what might be the problem? By the way I tried the solution here but it's still not working https://drupal.stackexchange.com/questions/13868

Drupal Views Relationships and Arguments

≡放荡痞女 提交于 2019-12-24 10:58:31
问题 I have a Person content type. It has a node reference field of a company which is also a content type. I then have a content type called Project. A project has a node reference to a company content type. I want to list all the projects related to a person id (nid) If I abstract this away from views and Drupal and each content type had it's own table I would use something like. Select ProjectName from Projects where CompanyID IN (select CompanyID from Perons where PersonID = 10) Can I do