German Website
Home Features Screenshots Videos Downloads Shop Knowledgebase

Search Knowledgebase:


Merge Pages via Plugin

User question:

> I have a page with the format and want

> to merge with sub pages. The sub pages have the format



> and so on. How can I do that

> since the Merge feature only supports URLs with parameters.


If the sub pages don't have parameters (such as &page=NN) then you have to create a private plugin to merge these pages into a single page. The source code below will work with the URL syntax in the provided example:


Sub Wsw_MergePages(Handle, ..........)
   Dim nParamPageNumber, sFilename
   If nPageNumber > 5 Then
   End If
   sFilename = GetFirstRegexMatch(sUrl, "page\/\d+")
   If sFilename = "" Then
      nParamPageNumber = 2
      sUrl = ReplaceText(sUrl, sFilename, "")
      nParamPageNumber = CInt(ExtractDigits(sFilename)) + 1
   End If
   sFilename = "page/" + CStr(nParamPageNumber)
   sUrl = sUrl + AddSlash(sFilename)
   If Pos(sUrl, sMemWeb) > 0 Then
      sStatusMessage = "New page via Merge-Plugin"
      sNewUrl = sUrl
      sStatusMessage = "Merge-Plugin executed"
   End If
End Sub