For the Intranet project I'm working on I have a problem.
I made products for parent nodes. (using node hierarchy)
On those product there are child nodes that describe the product.

Like a table is the product, with a description and a image.
Under this table there's a certificate, legs, top, ...

Know there's a view for these children nodes, how to display them.
And I love node hierarchy. But know the sales department wants to be able to get these complete page (parent + child) in word. Sow they can "tweak" it a little bit and send to the customer.

I found data export and I get how it works wit a little test page.
But I wound to couple it to the parent node and export as well the parent as all the children.

I don't know how to override the parent node with views. The solution I find everywhere is panels. But I need views for the export data functionality.

I'm using drupal 7. latest version of views, data export en node hierarchy.
I also found lot's converters for HTML to WORD. But most of theme you have to pay and they are separated software. I would like to have a simple button on my site. "This page to word" where to users can click on and the page opens in a .doc file.

I'm sure that I'm not the only one that would be happy with this functionality....

Comments

augustynen’s picture

I actually need something like: http://drupal.org/sandbox/neilt17/1694708

the Docx module

It uses HTML to docx Converter that you can find here: http://htmltodocx.codeplex.com/.
But it's not very clear for a newbie haw to get this working on my site.

augustynen’s picture

Assigned: augustynen » Unassigned

Mmm, also no can do with this features.
Still looking, if anyone has an idea? I'm happy

augustynen’s picture

I'm a designer, sow I used CSS to help me out. If anyone else has problems with this: here you go:

css:

  <style type="text/css">
	.technisch, .productie, .NL, .FR, .EN{display: none}
  </style>  

Javascript function:

        <script type="text/javascript">
            window.onload=function(){
                var selO = document.getElementsByTagName('select');
                for(i=0; i < selO.length; i++) {
                    selO[i].onchange = function(){
                        showHide(this.value);
                    }
                }
                productie = getElementsByClassName(document, 'div', 'productie');
                technisch = getElementsByClassName(document, 'div', 'technisch');
				NL = getElementsByClassName(document, 'div', 'NL');
				FR = getElementsByClassName(document, 'div', 'FR');
				EN = getElementsByClassName(document, 'div', 'EN');
            }
            function showHide(paras) {
                switch (paras) {
                    case 'productie':
                        showHideElems(productie,'show');
                        showHideElems(technisch,'hide');
                        break;
                    case 'technisch':
                        showHideElems(productie,'hide');
                        showHideElems(technisch,'show');
                        break;
					case 'NL':
                        showHideElems(NL,'show');
                        showHideElems(FR,'hide');
						showHideElems(EN,'hide');
                        break;
					case 'FR':
                        showHideElems(NL,'hide');
                        showHideElems(FR,'show');
						showHideElems(EN,'hide');
                        break;
					case 'EN':
                        showHideElems(NL,'hide');
                        showHideElems(FR,'hide');
						showHideElems(EN,'show');
                        break;
					}
            }
            function showHideElems(elemsA,status) {
                for(i=0; i < elemsA.length; i++) {
                    elemsA[i].style.display = (status == 'show')? 'block' : 'none';
                }
            }
            function getElementsByClassName(oElm, strTagName, strClassName){
                var arrElements = (strTagName == "*" && oElm.all)? oElm.all : oElm.getElementsByTagName(strTagName);
                var arrReturnElements = new Array();
                strClassName = strClassName.replace(/\-/g, "\\-");
                var oRegExp = new RegExp("(^|\\s)" + strClassName + "(\\s|$)");
                var oElement;
                for(var i=0; i<arrElements.length; i++){
                    oElement = arrElements[i];
                    if(oRegExp.test(oElement.className)){
                        arrReturnElements.push(oElement);
                    }
                }
                return (arrReturnElements)
            }			
        </script>

and than you have to make a select box, I made a block with this:

<div>
<select>
<option value="" SELECTED> - maak een keuze - </option>
<option value="productie">Productie</option>
<option value="technisch">Technisch</option>
</select>
</div>
<div class="technisch">
<select>
<option value="" SELECTED> - kies uw taal - </option>
<option value="NL">Nederlands</option>
<option value="FR">Frans</option>
<option value="EN">Engels</option>
</select>
</div>

HAVE FUN

MustangGB’s picture

Issue summary: View changes
Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.