In our case in diplaysystemFU we have something like :
<cfset friendlyURLString =
"/go/article/#DateFormat(stObj.publishDate,'yyyy')#-#DateFormat
(stObj.publishDate,'mm')#-#DateFormat(stObj.publishDate,'dd')#-
#stobj.title#">
<cfoutput>#friendlyURLString#</cfoutput>


Piece of code that does the paging of body section looks like:
<cfset pageLength=6000/>
<cfset articleLength = Len(#stObj.web_body#) />
<cfset startPosition=1/>
<cfset endPosition=articleLength/>
<cfset currentPageLength=0/>
<cfset searchPosition = 1/>
<cfset currentPage=""/>
<cfset page = arrayNew(1)/>
<cfset numberOfPages = int(articleLength/pageLength)+1/>
<cfparam name="url.pg" default="1"/>



<cfloop from="1" to="#int(articleLength/pageLength)+1#" index="i">

<cfif i EQ 1 && pageLength GTE articleLength>
    <cfset searchPosition=startPosition>
        <cfset endPosition=articleLength>
        <cfset currentPageLength=articleLength-startPosition+1/>
<cfelseif startPosition + pageLength GTE articleLength>
    <cfset searchPosition=startPosition>
    <cfset endPosition=articleLength>
        <cfset currentPageLength=endPosition-startPosition+1/>
<cfelse>
        <cfset searchPosition=startPosition + pageLength>
    <cfset endPosition=Find("</p>", stObj.web_body, searchPosition)+3>
        <cfset currentPageLength=endPosition-startPosition+1/>
</cfif>
<cfset currentPage=#mid(stobj.web_body, startPosition,
currentPageLength)#/>
<cfset page[i] = currentPage/>

<cfset startPosition=endPosition+1/>

</cfloop>

<cfif not isNumeric (url.pg)>
        <cfset url.pg = 1/>
<cfelseif url.pg GT numberOfPages >
        <cfset url.pg = numberOfPages />
<cfelseif url.pg LT 1>
        <cfset url.pg = numberOfPages />
<cfelse>
        <cfset url.pg = int (url.pg)>
</cfif>
<cfoutput>


<cfif #left(page[url.pg], 2)# EQ "<p" >
        <cfif url.pg EQ 1>
        <cfset page[url.pg]=  "<p>" & getThumbnailImage
(stObj.relatedImage) & getRelatedArticles(stObj.objectID) &
getRelatedGalleries(stObj.objectID)& getRelatedMultimedia
(stObj.objectID) & locationName &  ReReplace(page[url.pg], "<p[^>]*>",
"")/>

        <cfelse>
        <cfset page[url.pg]=  getThumbnailImage(stObj.relatedImage) &
getRelatedArticles(stObj.objectID) &  getRelatedGalleries
(stObj.objectID) & getRelatedMultimedia(stObj.objectID) & page[url.pg]/
>

        </cfif>
<cfelse>
        <cfif url.pg EQ 1>
        <cfset page[url.pg]= getThumbnailImage(stObj.relatedImage) &
getRelatedArticles(stObj.objectID) &   getRelatedGalleries
(stObj.objectID) & getRelatedMultimedia(stObj.objectID) & locationName
& page[url.pg]/>

        <cfelse>
        <cfset page[url.pg]= getThumbnailImage(stObj.relatedImage) &
getRelatedArticles(stObj.objectID)  &  getRelatedGalleries
(stObj.objectID)& getRelatedMultimedia(stObj.objectID)& page[url.pg]/>

        </cfif>
</cfif>

<cfif url.pg EQ numberOfPages and stobj.connectTo neq "" >
        <cfset page[url.pg] = page[url.pg] & "<p class=""connectTo"">" & trim
(stobj.connectTo) & "</p>" />
</cfif>

#page[url.pg]#

   <cfif int(articleLength/pageLength)+1 GT 1>
    <widgets:paginationDisplay
                        QueryRecordCount="#int(articleLength/pageLength)+1#"
                        FileName="#cgi.SCRIPT_NAME#"
                DivStyle="pagination"
                        MaxresultPages="25"
                        MaxRowsAllowed="1"
                        bEnablePageNumber="true"
                        LayoutNumber="3"
                        FirstLastPage="numeric"
                        Layout_Previous="Previous"
                        Layout_Next="Next"
            extraurlString="#rereplace(cgi.QUERY_STRING,"[\?]?&pg=
[0-9]+", "", "all")#"
                         >
   </cfif>


Thanks,

Mika
















On May 28, 11:09 pm, Tomek Kott <[email protected]> wrote:
> One note on the displaySystemFU. The friendly url should be an <cfoutput>
> call. At least, that is how I understand it and it seems to work for me.
> So in your case it looks like you need:
>
> <cfoutput>/go/article/#DateFormat
> (stObj.publishDate,'yyyy')#-#DateFormat(stObj.publishDate,'mm')#-
> #DateFormat(stObj.publishDate,'dd')#-#stobj.title#</cfoutput>
>
> That said, it appears that somehow the title and the webskin are getting
> confounded. Can you maybe post the code that actually paginates the article?
> Maybe that would help...
>
> Tomek
>
> On Thu, May 28, 2009 at 1:56 PM, smika <[email protected]> wrote:
>
> > Dear friends,
>
> > we are having trouble with paging of body with 5.1 friendly urls. We
> > have paging created for the article, so in case if article is long is
> > being break to equal pieces.
>
> > It was working perfect for 5.0, but now it gives error like this:
>
> > Parameter 1 of function IsDefined, which is now
> > application.stcoapi.ctArticle.stWebskins.2009-05-02-atom-egoyan-talks-
> > about-his-new-film-adoration.path, must be a syntactically valid
> > variable name.
>
> > COLUMN           0
> > ID      CF_CFPAGE
> > LINE    391
> > RAW_TRACE       at
> > cfcoapiadmin2ecfc255712704$funcGETWEBSKINPATH.runFunction
> > (E:\webs\reporter.am\wwwroot\test\farcry\core\packages\coapi
> > \coapiadmin.cfc:391)
> > TEMPLATE        E:\webs\reporter.am
> > \wwwroot\test\farcry\core\packages\coapi
> > \coapiadmin.cfc
> > TYPE    CFML
> > 2
> > arguments - struct
> > COLUMN  0
> > ID      CF_TEMPLATEPROXY
> > LINE    678
> > RAW_TRACE       at cffarFU2ecfc163479814$funcPARSEURL._factor4(E:\webs
> > \reporter.am\wwwroot\test\farcry\core\packages\types\farFU.cfc:678)
> > TEMPLATE        E:\webs\reporter.am
> > \wwwroot\test\farcry\core\packages\types
> > \farFU.cfc
> > TYPE    CFML
>
> > We have created displaySystemFU.cfm with piece in it like this:
> > <cfset friendlyURLString = "/go/article/#DateFormat
> > (stObj.publishDate,'yyyy')#-#DateFormat(stObj.publishDate,'mm')#-
> > #DateFormat(stObj.publishDate,'dd')#-#stobj.title#">
>
> > You can check it at:
>
> >http://www.reporter.am/go/article/2009-05-02-atom-egoyan-talks-about-...
>
> > Please help
>
> > Mika
--~--~---------~--~----~------------~-------~--~----~
You received this message cos you are subscribed to "farcry-dev" Google group.
To post, email: [email protected]
To unsubscribe, email: [email protected]
For more options: http://groups.google.com/group/farcry-dev
--------------------------------
Follow us on Twitter: http://twitter.com/farcry
-~----------~----~----~----~------~----~------~--~---

Reply via email to