Drupal: taxonomy filter from separate view - drupal

this is my first website in Drupal 7, I'm trying to learn this framework, but I'm encountering a problem to which I could not find a solution yet.
I'm trying to create a page with a panel that has 2 views (as seen in this photo), the left view contains a list of categories (terms from taxonomy) and the right view contains a list/grid of projects (Content Type). Each project is of a single category and when I click on a category on the left side I want it to filter only the projects of that category on the right side, in the same page (or a new page with the same layout ../projects/category_term_1).
What happens now is that when I click on a category, I'm taken to a page that diplays the projects listed as taxonony term ( ../taxonomy/nr_taxonomy) different layout (like blog, but without categories on the left side).
I have aces to another project where the functionality that I want is implemented is a sort of similar type of pages. I tried to replicate all configuration from that site to mine, but the only difference that I'm able to notice is that the value of "STORAGE" column the administration/structure/pages is "normal" for my website and "in code" for the other site.
Site's layout:
https://www.dropbox.com/s/ep72wnpah42mdv3/site_layout.jpg?dl=0
Thank you!

I think your main view should use a contextual filter, based in the URL given. This way, the view would only show those projects in the specified category.
In the left view, you should show the taxonomy terms, but you should modify the URL given with your custom one: www.example.com/projects/taxonomyTerm
Hope it helps

Related

Taxonomy block view shows no content

I am using Drupal 8.
I am trying to create a block display to show a list of teasers with the taxonomy term of the current node, within a custom region.
The problem is that when I navigate to the page which contains the custom region no content is displayed.
Other blocks display fine when assigned to the custom region so I don't think its anything to do with my templates.
The same view also has a page display (basically the default taxonomy term view) which shows content correctly when i navigate to the node.
I am a relative Drupal newbie so may be missing something obvious here but as far as i can tell the taxonomy view works as a page but not as a region, so either it must be something to do with the block configuration, or Drupal is just not meant to work like this.
Can anybody suggest what might be causing this, or if this is a bad approach explain why?
are u using exposed filters in your view ?
For it to work in blocs , u need to configure in your view
ajax:on

Best way to create content type and taxonomy on Drupal 7

I'm going to try to explain my project.
I have one section to create on my drupal's site called "Press Room" in this section the users access it via menu item called "Shows". The mainly idea is that the second level of this menu will be created with taxonomy vocabulary called shows and the terms of this are for example:
-Shows(Voclabulary)
-Heartland(term)
-Bulloch Family(term)
And now the next step is create for each one of the terms the next structure:
-About
-Press Materials
-Video
-Fotos
To be more specific I've attach two piece of wireframes of these.
What is the best way to do that?
Thanks!!
[The menu show like that][1]
![The content once you click in the menu][2]
http://i.stack.imgur.com/tijAU.png
http://i.stack.imgur.com/1oifQ.png
I can propose a solution although there are too many options here.
1) Heartland(term) -Bulloch Family(term): there is no need to use taxonomy terms, they can be node types (let's call it "Show" content type).
2) About, Press Materials, Video, Photos and Contact will be 5 node types too. But these will have a reference field to the node types above (Shows).
3) The display page of each Show will be a views that will display the node Show and the content that are referencing this node.
4) Menu can be created by hand (if shows are not too many) or by a views that will show a list of node links.
Examples:
http://ericgilbertsen.com/2013/06/create-related-content-blocks-drupal-7-views-entity-reference
http://www.webomelette.com/related-content-block-views-drupal-7

Concrete5 Custom Content Types (Blocks)

Is there anywhere online where one can find how to create custom blocks in the same way we can create custom content types in Wordpress. The desired result is to add a block that will allow the user to add/edit custom fields like client name, portfolio description, portfolio thumbnail.
I've created a free tool called "Designer Content" that lets you easily generate these custom blocks:
http://www.concrete5.org/marketplace/addons/designer-content
That being said, it is important to understand this key concept: In Concrete5, everything revolves around PAGES. In general, you want to try to establish an architecture where each piece of data is represented on its own page (a "details" page, which would roughly equate to a single blog post in Wordpress). Then you use the Page List block (usually creating a custom template for it to modify its look) to list out titles, links, and excerpts/photos from each of those "details" pages on a top-level "index" page (roughly equivalant to the home page or category archive in Wordpress).
For example, if you're building a portfolio site, you might want one top-level "Portfolio" page that shows a thumbnail and title of each piece, then a "Portfolio Item Detail" page type that contains one piece per page -- each living underneath the top-level "portfolio" index page.
The benefits of this approach are C5 gives you out-of-the-box tools to manage your "data" (pages) in this way -- users can add, edit, delete, and rearrange the pages via the "Sitemap" in the dashboard. Site search works without any modification -- each page (i.e. portfolio piece) will be its own search result with a link to a specific page. Also you then have more fine-grained control over access permissions if you ever decide to restrict access to only certain groups of people (registered users, etc.).
If you take this approach, you might find the "Page List Teasers" addon helpful (it will let the Page List block -- which you're using for your top-level "index" page -- to show actual content excepts from the pages instead of just a separate "description" field):
http://www.concrete5.org/marketplace/addons/page-list-teasers
Or if you want to dive deeper and customize the page list template even more, I have a starting template with a ton of code comments in it explaining how to do different things here:
https://github.com/jordanlev/c5_clean_block_templates/blob/master/page_list/view.php
But... if you're only talking about small amounts of information and you think a separate page for each one is overkill, then the Designer Content approach I linked to first will work just fine.
You can find a HOW-TO on creating new blocks written by Franz Maruna on the concrete5 website.
Here is the link: Creating a New Block Type
There is also a simple block you can download and install to help you follow the developer tutorials. You can find that here: Simple block template

Drupal Views of nodes to show node comments

I've encountered a Drupal problem: I'm using the Views module for rendering nodes of a kind, based on the user id of it's author (it is a Content Profile actually). I want the view to show the comments for the node, just like in node/%. I could not find any option in views or any relevant module. Am I in the wrong direction and should reorganize stuff for this...?
Any ideas, how can it be done?
Regards,
Laci
Using views is really not the best plan of action. You should instead create a node template in your theme and customize it. If needed you can put some logic in a preprocess function. It requires more coding but will get you where you want.
If you use view node display type
Check in it's settings show comments
if you use view fields display type
Use relationship to comments and select fields you need and theme them
I know this is old request, but I was just struggling with the same issue and came across this post. I thought it'd be helpful to share my solution.
I'm using Drupal 7, with Views 3 and Display Suite.
In your view, choose the display in question.
Under Format, click the first link to the right of 'Show'.
Choose 'Content' (or 'Display Suite' in my case).
Click 'Apply'.
On the next screen, you'll have the option to 'Display comments'. Check this box and save your view.
You should now see the comments displayed under each item in the view.
You could create a second view (with URL e.g. /comments/% where the placeholder will be the node ID, and not the comment ID) that lists comments for a given node, with a contextual filter to only show them based on the NID in the URL.
Then, add that view to the footer (as a 'view area') of the single-node view you've already got.
There's some tweaking required for layout (inline fields etc.) but the basic structure should work.

How to create a simple company blog with a Tag-Cloud in Drupal-6?

I have to create a simple company blog within drupal-6. That means there should be only one single blog each user can post into.
What i have done so far is to create a custom content Type (blog) and a view that displays teasers of the recent blog entries with links to the full blog post.
Now i have to create a Tag-Cloud for this blog.
I created a taxonomy vocabulary for this "blog" content type and set the settings to Tags (Terms are created by users when submitting posts by typing a comma separated list.)
I also installed the Tagadelic Module and created a tag cloud with it, that works great and it displays all the Tags i entered when creating new blog entires.
But now to my problems:
First: If i click on an entry in this tag-cloud the default Taxonomy_term view is used to display the resulting blog entries. Thats bad because i would like to have it displayed the same way as in the view i already defined to show the blogs. Is there a way to use my view to display the results of the tag-cloud?
Second: On my view, below each blog-teaser should be a link to related blog entries (the ones that share the same terms). I do not have a clue how to do that.
is this even possible with the setting i have now or should i maybe take a whole other approach to create that company blog with tag clouds and related blog entries?
You should be able to solve both problems pretty easily, while keeping your current approach:
Take a look at your views list ('admin/build/views/list'). You should see a view called 'taxonomy_term (default)', which is usually disabled by default. This is an optional override of the built in taxonomy term page. You can enable this and configure it to look like the blog view you created.
Alternatively, you could leave that one disabled, but add another display of type 'page' to your already existing blog view, and configure that as an override to the built in taxonomy term. For this you'll need to set the path of that display to 'taxonomy/term/%' and adjust the display to use the term id argument as a filter (look at the above override for how this works).
You could also do it the other way round - use the default taxonomy_term override view, configure its output according to your blog view needs, and add another display for your recent blog entries to that. After this, delete your own blog view and use the new display of the taxonomy term override instead.

Resources