Drupal Lightbox issue (not jQuery lightbox) - drupal

I am having a issue in Flag_list module, can anyone please help me out how to put a flag list and how to view it please?

The module has very good description how to do it : http://drupal.org/project/flag_lists
How to use:
Install as usual.
At admin/build/flags you will see a flag "fl_template." This is a default template flag provided by flag_lists. You can edit it to make changes to list messages and to assign it to node types. This
template will be used only on types you assign.
You can create new templates here: admin/build/flags/lists/template and apply them to other node types.
A template can be assiged to many node types, but a node type can only have one template assigned to it.
Enable the "list" block so that it is displayed on your content. The block will only be visible if the content is listable and the user has permission to create lists. That is, the node type must be assigned a template, or the block won't appear. Further, you should enable the link to create lists in the block's config.
Create new lists using the link in the block.
See your lists and listed content at user/[uid]/flags/lists

Related

Create custom page template based on default for dexterity type

I have created a page template for my custom dexterity type.
The default view automatically shows all the fields, rather than my custom template which shows no fields.
I'd like to start my template by copying the default template. I have tried pasting in a copy of plone.app.dexterity.browser/item.pt however that gives me
LocationError: (<my.types.resource.ResourceView object at 0xb4d18bcc>, 'widgets')
I am not sure why.
I guess that using this template might not even be the best solution, if I need to change the way individual fields render. In that case I am wondering how I can start with a template which contains the fields in my type (in the past I used ArchGenXML). Is there an equivalent process for dexterity?
Derive your view class from dexterity.DisplayForm.
This may make your copy/pasted template work immediately by giving it the view methods and properties it needs. It will also make available variable like view.widgets, which contains a list of display widgets in schema order.
See http://developer.plone.org/reference_manuals/external/plone.app.dexterity/custom-views.html#display-forms for details.

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

Creating a view for a node

I'm having some problems creating a view for a node within my website.
The content has a path of 'content/%' where % is the title of the node.
What I tried to do is to create a page view in the Views2 module, but to no avail.
When I attempt to preview with the name of one of my nodes, nothing appears, and when I visit the node live, it renders text to the screen without any formatting.
Here are some of the settings from my View...please let me know if I should provide any extra information!
Page Settings
Path: content/%
Arguments
Node:Title
Title: %1
Action to take if argument is not present: Provide default argument
Default argument type: Node ID from URL
Edit
I will describe the behavior I'm expecting to see...
I have a list of nodes in my website in a view....that shows up without any issue.
What I would like to do is click on the node and go to that node's page, which is basically an expanded view of a single item from my list.
I thought what I could do is clone my list view and then add an argument to trim the scope from a list to a single item, but this isn't working too well. What is the proper method for styling a single node?
Edit:
Based on your edit, you've already used Views to create a list of nodes, and now you want to be able to click on one and get to the node page.
If you just want the default node output, you shouldn't have to do anything else. Don't try to use a View to override default node rendering; Drupal will print it out by default.
If you want to theme your node uniquely (beyond what moving the fields around and changing display settings in the UI allows you to do), then you should look at custom template files and theming. Resource here: http://drupal.org/theme-guide
You can change the default node.tpl.php file if you want to change how all nodes are displayed, or you can copy that file and rename it to node-name_of_custom_type.tpl.php to uniquely theme a custom content type you've created, but I'd suggest reading up on the Drupal theme system before making those changes.
End of edit
When you want to assign a path to a Views Page display, you shouldn't model it after any existing paths (e.g. node paths, as you mention). It should be something unique to avoid path alias conflicts. So for example:
my-path/%
Now, if you're just looking to embed a view inside of your node (and you want to pass along the node id as the argument), you're half-way there. Your Arguments setting, based on your description, is correct. However, you don't need a page display.
Here are a couple of options:
Quick 'n' Dirty: Create a block display (which doesn't need a path) and stick the block in a region on the node page (I've used the content_bottom region) to "embed" it in your node
Powerful, Flexible: Use the views_embed_view function (api docs here) inside your node (the body or a CCK field, just make sure to use the "PHP filter" input format)
If you use views_embed_view, you have the flexibility of sticking your Views results wherever you like, and you don't even need to create a Views page or block display, because that function can just use the "Default" display.
Note: If you export your View and save the export code on a site like pastebin or drupalbin, folks here can import the View and see it directly to help answer your question in full detail.
Okay, got it. :)
Using Node: Title as an argument is pretty tricky: with the default settings, the argument must match the title exactly. So, if you wanted to match on "Test value", your path would need to look like content/Test%20value (note the caps).
This will get you the node you want. You said you have default argument set to Node ID from URL; that really doesn't apply for Node: Title arguments. What it does is attempt to find a numeric Node ID and use that as the argument, which will never validate on a Node: Title unless the node's title happens to match the node's ID.
If you just want to display all the nodes if there isn't a title argument present, select Display all values as the action to take if an argument is not present. If you want to display all nodes if the title argument is invalid (like a typo or something), make sure Display all values is set in the Validator field group for the action to take if the argument does not validate.
Because of the exact match restriction on node titles, it's generally not a good idea to use Node: Title as the argument. Instead, consider using "content/NID", where NID is the Node ID of the row's node, as the link in the original view Then, instead of the Node: Title argument in your view, use the Node: ID argument. This should make it less error-prone.

Drupal 6: Drupal Themer gives same candidate name for different type of content types

I'm a drupal newbie...
I have different type of contents like News, Events, etc. and their content is different. News detail page has title-content text-date. but Events detail page has title-date-content text-location-speaker-etc. So I need different layout page for these different types. So, I enabled Drupal Themer to get a candidate name. for events page, it gave me page-node.tpl.php and it gives same for News page as well :( how can I separate these pages? I expected sth like page-event-node.tpl , but no... :/ Drupal Themer also give unique candidate name for event page like page-node-18.tpl.php but it doesnt mean anything since I can not create a general layout for all events by this node name. :(
Appreciate helps so much!! Thanks a lot!!!
While using different node.tpl.php files as suggested by monkeyninja (+1) would be the 'normal' way, you could add the functionality you want by adding page template suggestions based on node type yourself, in a preprocess_page function within a custom module/theme:
function yourModuleOrTheme_preprocess_page(&$variables) {
// If this is a node page, add a page template suggestion based on node type
if (isset($variables['node'])) {
// Build the suggestion name ('.tpl.php' suffix will be added by the theming system)
$suggestion = 'page-type-' . $variables['node']->type;
// Add to end of suggestion array, thus keeping the fallback to other suggestions,
// if this specific version is not implemented by the theme
$variables['template_files'][] = $suggestion;
}
}
With this in place, you should be able to add e.g. a 'page-type-event.tpl.php' file, which should be used for all event node pages.
(NOTE: You'll need to trigger a rebuild of the theme registry after adding that function to get it recognized by the system)
I'm not familiar with Drupal Themer, but a slightly different approach would be to work with the node templates to style the content and use something like the excellent Context module (and possibly Panels module) to change the layout of any additional information on the page (eg the blocks).
To theme the different content types using node templates, just create templates based on node.tpl.php in the form node-content_type.tpl.php. So you'd have a template for your events nodes called node-events.tpl.php.
You could then define a context using the Context module that reacted when a page of the events content type was displayed and select which regions/blocks you wanted displayed.

Drupal User Profile

One of my favourite sites at the moment is developmentseed.org. I really like what they do with there user profiles. How would you go about recreating it.
http://developmentseed.org/team seems to be a view of users/nodes
/team/eric-gundersen is a profile/node
"Posts by Eric Gundersen" block on the right of 2. seems to be a view. Is an argument being parsed to return content by Eric?
/blog/2009/oct/21/announcing-managing-news-pluggable-news-data-aggregator the user name links to the profile/node
Same link as above seems to be a block (teaser I guess).
Do you think there are using the defaults drupal module or a custom content type? How would you go about trying to implement something like this?
Thanks
Ryan
This seems to be a view of users with 3 fields: The avatar, the title of the user node (see 2) and the role name.
They're most likely using Content Profile.
In Views you can add an argument and specify that when no argument has been supplied (as is always the case for a block) a default value should be used. Among those default values you can select the user id from the current path. By adding a argument for the author of a node and specifying a default argument for it you can limit a node list to just the nodes created by that author.
I think this is built in functionality - the nice URL is probably an alias for user/123 created through PathAuto.
The block is probably a variant of 3 - the default argument is to take the id from the currently shown node instead and the teaser comes from the node linked to the user with the module described in 2.
So - to create something like that I would install Content Profile and then create some Views with arguments that has default values and with block displays. Does that help? :)
Of course, you can easily custom and theme the related User Profile page by including a user-profile.tpl.php file in your theme.

Resources