create custom menu in views based on drupal node's cck field - drupal

I have a series of committees each one has multiple types of content ex: home page, members page, links page along with a cck field with the name I would like to create a menu block in views for each committees pages based on the value of the name in the cck field and print the only one block to all the pages. is their a way to use tokens in views to accomplish this or a separate module that will accomplish this.

The easiest way may be to just create a block view that displays an li list of the cck field for each committee. You can then style this like your menu.

I found a way to do it after continuing to look using views arguments and default php argument i created an if elseif statement for each committee.

Related

Exposed views filter made of titles

I'm making a views slideshow of some images.
These images have a title.
I would like to expose this title as a drop-down list filter.
I'm able to do this with pr-configured filter values, but i want this list to be build by the values that the end users gives as a title to a image. (or made of another field like description etc...)
So, when a user uploads images with a title "vacation", i would like this value to come up in the exposed filter in the views slideshow...
Thank you
This can easily be done using the Views Reference Filter module.
Create a views page with the fields you wish to display.
Add an Entity Reference display to your view.
Set which field should act as your search field in the format settings of the Entity Reference display (in this case Content: Title). Remove or exclude all other fields for this display only (override).
To your page display add a filter Content: Nid (entityreference filter) and expose it to visitors. Remember to select the correct view in the "View used to select the entities" drop down if you have more than one Entity Reference views.
Optional steps:
Enable Ajax for your view.
Set the exposed form style setting to auto submit.
If I were trying to accomplish this I would add a taxonomy vocabulary for these images, then I would add a field to the image content type referencing this vocabulary.
After that, I would use create a Rule that would react to saving a new image and add a new taxonomy term to that image that is the title entered.
You can then easily create a filter in views to filter off that taxonomy term and expose that as a dropdown. By doing this each image should have a taxonomy term attached to it that is the image's title. As images are added the taxonomy terms should appear in the dropdown.
Let me know if you need any additional guidance.

How to create dynamic pages in drupal?

I have contents in the following url:
mysite.com/project/node-id
But then i want the user to be directed to
mysite.com/entries/node-id when they click on entries link.
How do i achieve this? In the entries page i want to show a view which takes the node id from url and shows results accordingly.
The answer lies in using arguments with views. http://gotdrupal.com/videos/drupal-views-arguments .This video exactly represents what i had asked for ! using arguments in views we can create dynamic views of 'page' type display.
Create content type(Entries) by CCK
Use pathauto, to create desired urls for Entries content type(/entries/[nid]).
Then render this new content on project pages(Views, blocks, menus or etc)

drupal replacing default nodes with views page

I have created a page view using field style to display a list of teasers as I want. fields configuration in views allows us to link the field to it's node. but what if we have created view for node detail page and want field to link to it's relevant view.
I had the same question, and after a bit of research this is what I've concluded:
The views module isn't intended to replace a default node view. I say this because of the level of difficulty involved in doing this and the lack of information on how to accomplish this. Ryan Weal has posted a way to accomplish this by editing your node template that doesn't look too difficult to accomplish, and here is the link.
However, it seems that a more popular solution, especially if you are like me and don't like to get into editing theme files. You can use the Display Suite module to effectively reformat the default node content as you would like.
I'm not sure if I understand you properly, but it sounds like you are wanting to display a view in a page view of a node?
In order to do this, you could:
create a small module, using hook_nodeapi() or one of the D7 replacements for this function in order to insert the output of the embedded view into this page's content, by conditionally adding a $content element when the node is of the appropriate id
or (easier, but requires allowing input type PHP) embed the view right on the page.
http://thedrupalblog.com/embedding-view-drupal-6-using-views-embed-view for information on embedding views

Adding item to taxonomy menu vocabulary in the create content form?

I've implemented taxonomy menu in Drupal, and trying to set it up so that it is pretty easy for the user to add new items to the vocabulary from the create content form instead of having to administer the vocabulary itself.
So far, all I can manage is the default behaviour of displaying the existing items.
Edit:
Enabling the 'tags' option for the vocabulary does not allow the desired effect - I want the parent/child structure and drop-down menu in the create content form as well as the ability to add a new tag to that drop-down.
A bit more explanation as to why - I'm trying to create an image gallery using a hierarchy of tags (so, sports > soccer > match on 31st May) - the problem is that the general content creator for the site is non-technical, and I'd like to avoid having to make them work through the taxonomy/vocabulary items interface directly.
I think you're looking for the Hierarchical Select module.
Take a look at the last demo at the following page:
http://wimleers.com/demo/hierarchical-select/taxonomy
What you're talking about is called "tags" in Drupal. You want to check the "Tags" checkbox on the vocabulary edit page and that will change the interface on the content entry forms so users can add new terms/tags.

Creating content in a block in Drupal 6

By default for creating content a new page is opened. I want to do this inside a block. A block where there will be some fields like title body taxonomy terms and a create content button. How can I do this?
The form block module will do what you want.
You could you do the same thing in code, using hook_block to create a block. And using
drupal_get_form to render the form.
Try the Panels module.
http://drupal.org/project/panels
It will let you override and re-arrange the node add/edit form.
But, as Jeremy stated, to use this form on other pages of the site you will need to do something custom like hook_block and invoke drupal_get_form.
I agree with the answers from Jeremy and Kevin, but want to give another one.
You can use views to create the block! All you have to do is create a new view display with a block display. Add the fields you want to show, add a link field for the node/add/foo link and give it a node id filter or default argument. Here you have to choose the node id of the node to display in the block. Done!
What's nice with this solution? You can use almost every feature of views theming, drag and drop field ordering, adding new fields is cheap and no extra modules. ;)
Regards
Mike

Resources