Navigation paging problem

Discussion in 'Programming' started by simone2000, Jan 5, 2007.

  1. #1
    I have recently upgraded from coldfusion 5.0 to coldfusion mx6.1. However, I’m getting problem with a piece of code. I have a page with company's information and at the bottom right should be page navigation to continue to the next page/s - e.g 1 2 3 4 (similar to next and previous). However, when I load the page, I am not seeing the page links allowing the user to jump to page 2 or 3 and so forth. Can someone help?

    Here is the code:

    <cfoutput>
    <cfloop index="i" from="1" to="2">
    <cfif right(attributes.mainbody,1) is i>
    |<a href="dsp_companyinfo1.cfm">#i#</a>|
    <cfelse>
    <cfset url="companyinfo/dsp_companyinfo" & #i#>
    |<a href="index.cfm?dsp=main&temp=main&mainbody=#url#" class="pagelnks">#i#</a>|
    </cfif>
    </cfloop>
    </cfoutput>

    Also, I get error message with index.cfm:
    <cfif isdefined("attributes.act")>
    <cfset url="act_"&"#attributes.act#"&".cfm">
    <cfinclude template="#url#">
    <!---<cfelseif isdefined("attributes.dsp")>
    <cfset url="dsp_"&"#attributes.dsp#"&".cfm">
    <cfinclude template="#url#"> --->
    <cfelse>
    <cfinclude template="dsp_main.cfm">
    </cfif>

    on line 6 that complex object types cannot be converted to simple values.
     
    simone2000, Jan 5, 2007 IP