Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

hi, i have created a node tyoe w

Status
Not open for further replies.

amnovice2

Programmer
Aug 11, 2003
13
US
hi,

i have created a node tyoe which contains some documents. there is one category applied to this node. the applied category has 5 attributes.

I want to display the contents of a node type ( the list of dcouments ) and the values of attributes for that node on one html page.
How do i achieve this?

please help.

regards,
 
You will need to create a seperate WebLingo file for this node type and use this file instead of the standard one.
 
Hi Greg,

I created a new weblingo file for my node. but i want to call another weblingo (which generates the Categories page) from this page. but i am not getting the correct parameters.

can you please tell me how i should do this?

another way i am trying is to get the values using oscript using the function to get the frame f and then
List cats = f.AttrGroupList(0)
Assoc val = f.ValueGet(cats[1])
but the function ValueGet requires the "spec" as they call it. How to get this spec for a category?

regards,
 
In your Webnode actions object you can call a CAPI connect to the LLATTRDATA table that contains the category information of node.Here's a snippet of code
Code:
function Assoc _SubclassExecute
Object	webNode, Record	request )
Assoc	response = ._NewResponse()
	
//Pull the request record elements needed for performing
//transactions
Dynamic prgCtx = request.prgctx
Dynamic node = request.node
Dynamic contents = DAPI.ListSubNodes (node)
Assoc	data = response.data
String sqlStatement //did not use it ?
Object dapiCtx=prgCtx.Dsession()
Object dbConnect=prgCtx.fDBConnect
DAPISESSION dsession=prgCtx.DapiSess()	  
Dynamic execResult
RecArray records
Record rec
execResult=CAPI.Exec(dbConnect.fConnection,"select * from LLATTRDATA where id=40670")
//id should be genearted dynamcally the hard coding is
//for demo only
records=execResult
for rec in records
echo(rec.VALSTR)
//VALSTR holds the name of category
//pls check the other fields you want to use also
end

You may want to populate the response.data.contents with more info an use your web lingo file to show the category info.Pls let me know if this is possible.Otherwise the DAPI.ListSubNodes() doc s say it will take a string parameter for the category and return results but I think i did not understand it right.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top