Delete and modify fields shown in "drupalsite/node/XXX" - drupal-6

I need to delete/modify some fields shown in the full view of a node. This is when you go to "drupalsite/node/XXX".
(They only will be shown depending of the value of another field of the same node).
I have used nodeapi > view but I am not able to make it work. What am I missing? How should I do it?
Thanks in advance :)

You can use function template_preprocess_node(&$variables) in {your_theme}/template.php

Related

How to enable grid footer SummaryType?

So I just discovered you can enable the grid footer. And in theory you can show whatever you want in there e.g. display text or sum etc.
The Text property seems to work. The SummaryType doesn't. I feel like there's a missing step or something.
Has anyone managed to make the Footer work ? Just so you know, StatusField is not going to cut it here as it won't fit.
TIA
If you look in the source code for the Sales Order Screen functionality, there is a constant called 'Availability_AllocatedInfo' which is used to construct the 'On-hand...' message in the summary above. If you search for that, you'll see that there is a 'Availability_FieldSelecting' function that sets that information. The field called 'Availability' that is updated is what is used to show the status. Look in the aspx for SO301000, to see all the elements you'll need to replicate the behavior.
Hope that helps

Flexible column layout does not work when Two Way binding

My app has a flexible column layout with the list report displayed initially, and then switch to two columns when I click on an entry in the list report. This works fine so far with one way binding with backend model. But when I switch to two way binding then the click on entry does not show the second column. I am using the following code to switch the layout to two-column.
this.byId("flexibleColumnLayout").setLayout(sLayout);
Inside the setLayout() , I see some code that speaks about two-way binding. I am not an expert though to understand that level.
Anyone has fixed such an encounter? Appreciate your help. Thanks...
this.byId("flexibleColumnLayout").setLayout(sLayout);
This is resovled. The setLayout method is triggering some code where is going through some two way binding check and did try property binding checking against backend model, which is not correct. Instead binding the control to local json model did work. Thank you all!

How to tell MODX wayFinder to detect the resource ID it is currently on

I am new to WayFinder but I have been working with it a bit and it has worked great for me, However I need something a little more dynamic that I'm not sure how to do.
I have a set of 5 pages in my website and each page has another side menu, but each menu for all five resources will be slightly different
I need wayfinder to detect what the current ID is and then display the appropriate menu
I've tried a couple things but nothign i can get to work:
[[!If? &subject=[[*28]] &then=[[Wayfinder? &startId=27&excludeDocs=28,29,30,31,32,33,89]]]]
So I need to say if the ID is = to 28 display this menu if the ID is = to 29 display this one and so on.
I've also tried &idIs=28 and a couple other variations but couldn't really find anything to help me out on this Does anyone else have any ideas how to make this work? Thank you.
With the solution typeset suggest, wayfinder will be called each time thereby causing uneeded loading time to your site. This will be faster because wayfinder only will be called when id = 28.
[[[[*id:is=`28`:then=`Wayfinder? &startId=27 &excludeDocs=28,29,30,31,32,33,89`:else=``]]]]
Read more on it here: http://modx.com/blog/2012/09/14/tags-as-the-result-or-how-conditionals-are-like-mosquitoes/
You can use output filters for conditional calls. Documentation for them is here
You code would looks something like this:
[[*id:is=`28`:then=`[[Wayfinder? &startId=27&excludeDocs=28,29,30,31,32,33,89]]`:else=``]]
If the menu needs to start from the current ID then you'd use
&startId=`[[*id]]`
If you want it to show all the resources in the current folder, you can use UltimateParent, so
&startId=`[[UltimateParent]]`
Hope this helps!
This should work. The subject is just the parameter you are comparing it against so it shouldn't contain the value.
[[!If?
&subject=`[[*id]]`
&operator=`EQ`
&operand=`28`
&then=`[[Wayfinder? &startId=`27` &excludeDocs=`28,29,30,31,32,33,89`]]`
]]

XPages view control link manipulation

I have a view control and at least one column has the option "Display as link" set. The link is generated manually. What I want to achieve is to add a url parameter which is added to a view column link. The usual link would like this
"http://host/path/file.nsf/$$OpenDominoDocument.xsp?databaseName=server!!path/file.nsf&documentId=03871DD0B47F88D4C12576AB00623137&action=editDocument"
What I would like to have is:
"http://host/path/file.nsf/$$OpenDominoDocument.xsp?databaseName=server!!path/file.nsf&documentId=03871DD0B47F88D4C12576AB00623137&action=editDocument?param1=value1&param2=value2&etc..."
There must be a (presumably easy) way to achieve this - unfortunately I don't know how...
Any help or hint is appreciated.
Many thanks in advance.
Michael
Follow the below steps:
1. go to All Properties of view Column which displays column values as link.
2. Compute the PageUrl with the below Code.
var col:com.ibm.xsp.component.xp.XspViewColumn = getComponent("viewColumn1");
col.getDocumentUrl()+"&param1=value1"

Drupal Views Arguments

I know how to successfully use arguments in drupal's views module, but when it "filters" based on those arguments it uses "=" in the where clause of the SQL statement. However, I would like to use "like" instead of "=" in the where clause of the SQL statement so I can pass in, say the title of a node, as an argument and then show all nodes that CONTAIN the title passed in. I am not interested in grabbing only the nodes where the title is exactly the same as the title passed in. Does anyone know how I can do this? Is this possible?
one possible solution would be to generate the view by code with your required query.
I am looking for the same solution. It looks like you can modify the query using the views_views_pre_execute hook. The link below has a pretty good explanation. Haven't tried it yet but giving it a shot now...
http://drupal.org/node/409808
You could export the view, which outputs the views-generated query as code, then modify the query to suit your needs, and load it programatically (http://www.chilipepperdesign.com/2010/01/15/how-to-programmatically-create-views-in-drupal-6)
In drupal 7 you can use views query alter to generate your custom querys:
Take a look at this example: https://gist.github.com/4001074
I don't think you can do this. See here (https://www.drupal.org/node/1578564):
There are no options for selecting which operator should be used with contextual filters (save the exclude option). All default to is equal to.

Resources