Multiple values with Drupal Embedded Media Field - drupal

I am a novice programming and I met this problem which I have not been able to figure out. Hope that you can help me out.
I am currently using Drupal 6.20 with the Embedded media field (http://drupal.org/project/emfield). I have added an Embedded Video field into a content type named Video-Post. I set the value of "Number of Values" as "Unlimited" at .../admin/content/node-type/video-post
When I proceed to create a new node for content type Video Post at .../node/add/video-post, I see 2 "Embed a video" fields (despite me not yet clicking on the "Add another item button") and a "Add another item" button.
I would like it to show only 1 "Embed a video" field even when I set the "Number of Values" as "Unlimited".
Which file and function should I modify to achieve this?
Thanks.

Without looking at the module I'm going to say you may be able to use form_alter() to modify the output.

Related

How does one relate Boxes/Blocks to content types in Drupal 7?

Hi and thanks for any help given in advance. I'm looking to have boxes in drupal 7 to show up in a content type. Similar to Node References (https://drupal.org/project/references).
Can anyone point me to a module that may already exist or maybe if one does not exist, any advice on how to go about programming this feature?
Thanks again
Okay so I went a slightly different route.
Here are my steps.
I created a content type named "Sidebar Callouts"
I then went to the "Basic Page" content type (replace basic page with your own content type)
I added a field of field type "Entity Reference" with a widget of "Autocomplete"
In the field settings I set "number of values" to unlimited
While still in the field settings, I went to the Entity Selection area and I set mode to "simple" and selected the "Sidebar Callouts" content type that I created earlier
That's it. I now have a way to let the client choose a callout that is created as a node.
I wish I could have found a way to use Boxes but alas, project timelines did not allow me to look further into it.

Drupal 7: Add view to content type

I've been making a template for a particular content type, but just ran into a problem: I need to embed a view into the content type.
I am aware this can be done via several different methods, but I don't see one that fits exactly my needs:
I need the view added automatically for all pages of that content type.
Using blocks in a region is not an option, as I want to avoid defining a region in the middle of a page that should only be available for a specific content type.
Translatable label.
Possibility to freely apply a template to all fields in the content type (excluding the embedded view).
I tried doing it via page layout (Panels) and simply adding node content fields and the view to my layout regions, but then I get another problem: I can't style my content fields without doing something that seems a bit over the top:
Currently I have about 20 different content fields in the content type that are wrapped in HTML and styled in my template file. I have a translated label for each of these in the template file. From what I can tell I'd have to add a template for each of the panes containing content fields to add my translated labels and HTML needed to style each field.
I'm not really fond of making 20 templates, 20 theme hook suggestions to get the templates to work and 20 regions in the panel layout just to get a view inserted in the content type.
Am I doing something terribly wrong here? Any suggestions?
You may want to try the Viewfield module or similar modules (search for "view field" or "view reference").
If you are doing something more complex like changing/filtering the view based on some value in your content type, then you may have to use Viewfield module in combination with something else that will help fill in the filter values.
I've never done something like this before so I'm not sure exactly what module combination would work but Rules or Computed Field come to mind as possible helpers.
You have to use "views node field" http://drupal.org/project/viewsnodefield, after installing this module you have to select the "Node content" in the display (like blocks,page). then click the add display. if you want to display the content like this page http://www.richtown.ae/?q=content/arabian-ranches then you have to download the views_galleriffic module and install it and choose the style option "Galleriffic Gallery". You can choose the content type by using the filter in the views.
That's it cheers
i implemented this in my website richtown.ae
if you still unclear please send me the email social#richtown.ae i will reply you & ready to help you we can share information
i am using this module in drupal 6.
I resorted to using the EVA module ( http://drupal.org/project/eva ).
In addition to Woodgnome's answer
Let's say you have a content type named 'Product'
You want to attach a view to it.
Here are the steps using the eva module :
On your view edit page :
Section Displays
+Add : Eva field
Section ENTITY CONTENT SETTINGS
Entity type:Node
Bundles:Product
That's it, going to a node product type will now display the view

Drupal 7 displaying image in search results

I have a content type called "people". When a search is made and one of the search results is of "people" type, I want to display two fields of the "people" type; an image called "photo", and a text filed called "email".
Under "Manage Display" of the "people" content type, I selected custom display types and selected "Search Result" box. After saving, I selected the new "Search result" button and hid all other fields except "photo" and "email". I then customized the photo to have image style of "thumbnail".
I saved, cleared the cache, and reindexed the site. The search results are correct but no images are shown. I am very new to Drupal, all the help I could find is for Drupal 6 and by reading the comments people say that the solutions shown do not work for Drupal 7. Help...
Have a look at the display suite module which will further augment what you are trying to achieve and probably work better for you.
Here is a screencast about the search results specifically

drupal 6 cck field: is there a easy way to duplicate cck field?

is there a easy way to duplicate cck field with the same propeties just to make it a diffrent name?
Yes there is. Edit: I see now you said cck field, but I read "cck type" instead :/
To use an existing field: See Gokul N K's answer.
Basically you:
Go to "Manage Fields" for your content type and under Existing field, add a new label and choose the field you want to use from the dropdown.
To duplicate an entire content type:
Enable the "Content Copy" module of CCK
Navigate to admin/content/types/export and choose the content type you wish to copy
Click "Export"
Choose all the fields you want to include in the export
Click "Export"
You will see a bunch of code output to screen in the "Export Data" box
The first few lines of the code need to be changed (to change name). Edit the first few lines as needed, for example:
$content['type'] = array (
'name' => 'NEW NAME',
'type' => 'new_name',
'description' => 'A new content type with all similar properties of another',
Copy everything from the "Export data" box
Click the "Import" tab at the top of the screen (or navigate to admin/content/types/import)
Paste everything into the "Import data" box, make sure "Content Type" is <Create>, and click "Import"
Oops looks like I am missing something :(
I think you can go the content-type manage fields(admin/content/node-type/page/fields page for example), there is an option called existing field.
From the drop-down you can select any of the fields that you have already created and then just give it a new label.
I think this should work. Let me know if you are looking for something else.
Just created a module that does this - I needed to clone fields within a content type and I couldn't find a quick and easy solution.
Have a look at: Content Clone Field
A release should be available within the next 12 hours.
Hope this helps.

How to Remove the More Info Link from RSS Feeds in Drupal 6

I need to remove the "more info" link from feeds. It appears that the link is added to the content in place of the break tag, but I see no option to disable this substitution for RSS feeds only. I am generating the feeds using a feed display in a view. Can anyone tell me how I can remove the "more info" link?
Thanks.
In vides it's possible to enable and disable a see more link. So most likely you can just turn it off. Take a look a the left column in the views UI.
You can try the following out:
First, I'm sure your in your view its Style: RSS Feed. Also make sure Row style: Node.
Besides the Row style: Node there is a Button (shaped like a circular gear). Click on it.
The following display types are available:
Use default RSS settings
Full Text
Title plus teaser
Title only
Choose option number (2)
Try to make a RSS-view.
(Sorry if I use wrong terminology as I use a Swedish translation of Drupal)
Then make a page and make the urlpath the exact same as for the feed (eg. aggregator/sources/10 for feed nr. 10)
This will replace the default list of rssposts and instead show your custom rss-view without the "show more" links.
This worked for me at least. Let me know if you need more info...
/Kristian

Resources