Drupal, Views.. how to display views list + complete node, interactively? - drupal

I'm using Views in Drupal to show node teasers. I would like now to show the complete node on the left side of my page, nearby the Views, and update it when the user click on a different teaser (better using AJAX).
what's the best method to implement it. I was considering to use a lightbox, but it a bit complex (a lot of complications... such as parsing the content with javascript again.. etc).
See screenshot: http://dl.dropbox.com/u/72686/viewsAndNode.png
Thanks

A quick and dirty approach would be to use an iframe to hold the node content. Users would then be able to switch between nodes without reloading the page, which is I assume your goal. I don't think there is away to achieve what you are trying to do with views out of the box. Have you looked into using panels?

Here's what might be a clean way to do it, of course in drupal there's always many ways to accomplish things.
Providing the content for the ajax call
Install the services module
Setup a service that provides your node as you want it to be displayed
Create the placeholder for your content
Install the Panels Module
Create a empty fixed width panel to contain the node you want to load
Load the view into an adjacent panel
In your controlling view
Add a PHP view header and use (drupal_add_js('script.js')) to add a custom js file to the page. or add this to a custom module, or even your theme.
Re-Write your view node links to help put the js events together
Setup your javascript events
Use add_js to add a custom javascript js file to the page
In the custom js add an event to the view links that will poll the services module and load the node into the placeholder panel

I've solved using the lightbox, and just removing the html code I don't need from the node template with php if the parameter "lightbox=true" is passed with the link.

Related

Plone - embed the content of an internal link in a page

I have a list of pages that have to appear in different places of my Plone. If I use an internal link, I see an HTML link in the page but instead of that I would like to see the embedded content of the linked page.
I've tried to install some link plugins (Smart Link, vs.alias...) but I'm not able to find the solution.
I'm using Plone 4.3.
I don't know any Plone Plugin, which satisfy your requirement.
A long time ago i wrote this small js to show internal links in a popup using Plone's prepOverlay.
In this case you can put a popup custom CSS class on the internal link with TinyMCE.
It simply shows the content area of the given URL.
$(function(){
jq('a.popup').prepOverlay({
subtype:'ajax',
urlmatch:'$',urlreplace:' #content > *'
});
});
I guess this is a good starting point for your own implementation.
You could think of a criterion like location, contenttype, etc., to distinct, which articles should be picked (in worst case use collective.flag), then fetch them with a collection, to give you the links as a resultlist, and set its view to all_content, a nice feature, introduced in the Plone-4 series.

How to show web page/web resource in CRM Dynamics?

I am new to Microsoft Dynamics. I managed to create new solution and know how to add web resource to particular page like Contacts. Also, I have added few buttons to Ribbon control with their actions.
Now my problem is, I want to add a button either to ribbon control or anywhere in page, which I can access in complete CRM (like I can do in Master Page of asp.net), and which will help me open my web resource.
For example, if I click on Charts bar, web resource should be visible, otherwise it should be hidden.
My question may be lame, because I am very new to CRM Dynamics, kindly suggest my way is correct or I need to take some different approach?
If I understand it correctly you're looking for a way to add a button to multiple screens without need to modify each of them separately. (To avoid the pain when modifying all the ribbons or all the forms.)
In that case I'd suggest creating a separate JS web resource with code that adds a button with desired functionality, styling etc. And use Form Libraries Manager from XrmToolbox to bulk add the resource to all the forms.

Force drupal to return 200

Is it possible to link to a page that doesn't necessarily exists as drupal content and not get a 404 page not found.
Example:
link: example.com/search/projects?content="words"
There is no search/projects node or page so obviously it returns page not found although I can still run my queries inside that page.
Views would probably be a solution here but I sort of need more control on the outputted html and don't feel like going in to the views templates.
I guess my question is if it is possible to mimic views feature of creating pages which will aggregate content but don't have content theme selfs.
Is this possible at all? It seems pretty standard right? I have no idea ho to do it thought...
You can create a menu item for search/projects and return anything you'd like.
http://api.drupal.org/api/drupal/developer%21hooks%21core.php/function/hook_menu/6
should get you started.

Can you have 2 views with separate exposed filters on 1 page?

I have two views loaded on the front page. Both contain exposed filters which when modified, display different content (done using the Better Exposed Filters module).
When modifying one view the URL will be http:example.com/?cid[]=1 and the changes will take effect.
When modifying the other view the URL will be http:example.com/?type[]=marketing_item and the changes will take effect however, this will reset the first view (this problem also happens when reversing the process).
Am I missing something or is this type of functionality not possible?
Process $_GET['cid'] or $_GET['marketing_item'] in argument handling code of your views...

Drupal, Views: using AJAX to load the complete node?

I've a View page with all the content of my website (the node headers). When I click on one of these header I would like to load the complete node without refreshing the page and display it on the left.
Can I do this with Views (I mean.. does it have a functionality to load a complete node and add it to the current page ?
thanks
I think it is possible using Views. Views is much more than just SQL generator.
Views can work with Fields, or with full node. Set it to full node.
Views can work with Ajax - set it to "yes" (I think it is Yes by default).
It is hard from your description to understand the whole picture, so I can't lead you any further. All I can say is that I use Exposed Filter with Ajax and load full node properly, chaning the content of the page.
Hope I helped,
You are welcome to ask me directly for further support.
Regards,
Shushu
No. Views is basically an SQL query generator. You can do what you describe with javascript, but I don't know what modules might be helpful.
Check out Modal Frame - http://drupal.org/project/modalframe
Basically, your view displays just the title, and you have "link title to node" enabled. Rather than jumping to node page, u want to display node content in modal frame pop up.

Resources