I would like to have sections of a site so the top menu is a menu of sections such as "About Us". Then I want to have a secondary menu of pages within that section in the left sidebar. I know how to lay this out in drupal, but I want to make it easy for my end users to put the page they create into the proper section of the website. Would it be possible for me to create a taxonomy of terms that represent the 5 or 6 sections of the site and then somehow create the path to the page for the section they select in the taxonomy pull down menu?
Download Node Hierarchy, it has exactly that functionality
Related
I have a page generated by Views which lists 5 Articles at a time. This view is paginated so that page 2 of this View will list the second batch of 5 Articles, page 3 will list the third batch of Articles, so on and so forth.
My question: is it somehow possible to extract fields from Articles listed on the page you're currently on, perhaps via the url? And I only want to them on the Articles being displayed by the page the viewer is currently on and not all the Articles.
My intent is to have a Views Block that would ...
determine what page of the paginated View above you're looking at
determine what Articles are listed on that specific page
aggregate and display the Taxonomy Terms of those listed Articles (Articles have a Taxonomy Term field) in the block
do all the above automatically as you change what page you're looking at
The way I'm going about this is to list all the the Taxonomy terms in a block which is relatively straightforward. What I can't figure out is how to filter it based on what Articles are being displayed to me in a paginated page.
I was thinking maybe this is possible to use it using the url of the paginated page which goes along this format: ?page=1, ?page=2, etc.
If anyone could just point me to the right direction, I would appreciate it. I'm also open to alternatives.
What if you created another display of the same view as your Article page view?
You could add a Relationship for the Taxonomy Terms and then the Fields in the block view would be the appropriate fields from the taxonomy terms. You'll want to setup the same Filters, Sort and Pager options for the two displays are the same. That way the results should match.
Then you might just want to hide the pager from the block view. You could do that through a custom template for that view display, or maybe a preprocess function that hides the pager for just your view, or maybe via CSS.
I have different nodes to which I apply taxonomy terms.
I want to display two separate blocks:
The first block should list all the taxonomy terms (HTML list would be fine) and each should be clickable.
The second block should list all nodes that have the taxonomy term clicked on the first block.
How would I achieve that? I am using Drupal 7 and the Views module. Thanks in advance.
You need to 2 block views for this.
But create just 1 view and the second view is already there in your default drupal views.
Follow this steps:
Create a view.
Select "Taxonomy Terms" for "Show" from drop down.
Select the related taxonomy vocabulary for "of type".
Click on Create a Block.
Click on "save & exit".
This will create your first view block with the taxonomy terms.
Now for the second block which should display all the node related to the taxonomy terms.
you just have to enable a view which is "Taxonomy Term".Go down words in your drupal view list there you will find this view in a disable mode. you need to enable it.
Now just override the view as you want to see that node page to display all the content related to taxonomy terms.Select the fields and filters according to normal view creation as we do.
Create a page for this second block and give path as you like.
Now use Context module(download if you don't have right now) to show the taxonomy terms block on the path you have given for views.
(Hope you will be knowing how to use context if not just leave a comment i will guide you for that)
I am new in drupal 7 and I want to create one view blog in which I can list out taxonomy as category and in under that I want to display two articles and a read more link to that category. Can any one explain in details how can i do that.
If you use a content type with a Term reference field for your category, it wil automatically create pages for each category with the articles tagged with that category listed within it.
If you want to have more control over these pages generated by the Taxonomy module, you can turn on the Taxonomy Term example view in de Views UI and add and remove the fields you want to display. The layout of these pages can be edited by creating a custom template file in you themes template folder for the file page--taxonomy.tpl.php.
There you could als create an additional block display (I assume you mean block when you say blog), and in the Page settings area, you can turn on de More link, and this will display a more link when more articles are available then you have set you pager to display (i.e. Use pager - Display a specified number of items - Items per page = 2). Make sure you change de setting from For all displays to This block (override) to not override the other displays.
This block you can place in any region on any page via the Blocks UI and is should do what you want.
If I want to change the content of the footer for $page['footer'] where do I change it? Im not talking about messing with the .info files. I dont know why its so hard to find!
Edit: If I am at on a page.tpl.php file and I do "print render($page['footer'])" how can I configure what is in the $page['footer'] variable to any html I want?
You should really read some of the basic documentation. Footer is a Drupal "region". Regions are populated with blocks.
block #
The boxes visible in the regions of a Drupal website. Most blocks (e.g., recent forum topics) are generated on-the-fly by various Drupal modules, but they can be created in the administer blocks area of a Drupal site. See the documentation for more information on blocks.
region #
Defined areas of a page where content can be placed. Basic regions include: Header, Footer, Content, Left sidebar, Right Sidebar. Different themes can define different regions so the options are often different per-site. Content is assigned to regions via blocks. They can be ordered by weight within regions to define the order in which they display.
If you want to add special static content to the Footer (e.g., Copyright notice, Admin email), you can create a custom block by visiting Home » Administration » Structure » Blocks (/admin/structure/block) and clicking "Add block" (/admin/structure/block/add).
If you want to display the content of a node in your footer, you may want to use Node Blocks. If you want to display the content of multiple nodes, you may want to use Views.
I have many content type that I have added in drupal 7 and I want them to be available in main menu. For example I have content types:
news
events
and I want the main menu look like
home - news - events
Despite I checked available menu > main menu
it doesn't show up in the main menu. How can I fix this?
Content types refer to the different types of nodes that you can create. Making your news content type available for the main menu means that, when you create news nodes, you can place them in that menu.
If you are trying to create a page that lists news nodes, you need to look into the Views module. It will allow you to create pages or blocks containing lists of content. Then, you can put those pages in the main menu. You can find the Views module here: http://drupal.org/project/views