Difference between revisions of "Issuepedia:Code/lib/links"

From Issuepedia
Jump to navigation Jump to search
(some renaming; recent links now sort properly)
(func ShowTopic now working, albeit just barely)
Line 65: Line 65:
 
   <let name=idx />
 
   <let name=idx />
 
   <let name=including val=1 />
 
   <let name=including val=1 />
   <if not flag=iTopic>
+
  <let name=topic farg=iTopic />
     <let name=iTopic parse>{{PAGENAME}}</let>
+
   <if not flag=topic>
 +
     <let name=topic parse>{{PAGENAME}}</let>
 
   </if>
 
   </if>
   <let name=iTopic with="_"> </let>
+
   <let name=topic with="_"> </let>
  
 
   <let name=sqlWhere>(page_namespace=0) AND (cl_to='</let>
 
   <let name=sqlWhere>(page_namespace=0) AND (cl_to='</let>
   <let name=sqlWhere append copy=iTopic />
+
   <let name=sqlWhere append copy=topic />
 
   <let name=sqlWhere append>')</let>
 
   <let name=sqlWhere append>')</let>
   <for table="qryW3_Titles_Catgs" where=$sqlWhere sort="page_title DESC" name=pg empty="no items yet" hide>
+
   <for table="qryW3_Titles_Catgs" where=$sqlWhere sort="page_title DESC" name=pg empty="no items yet" limit=5 hide>
 
     <let name=pg_title val="@row.pg.page_title" />
 
     <let name=pg_title val="@row.pg.page_title" />
 
     <let name=idx inc />
 
     <let name=idx inc />
 
     <load page=$pg_title />
 
     <load page=$pg_title />
 
     <call GetBrief />
 
     <call GetBrief />
 +
    <if flag=data[Title]>
 +
      <call GetBrief />
 +
    </if><else>
 +
<!-- if no new-style data, just display link to page so we can fix the problem: -->
 +
      <let name=links.out>
 +
* [[</let>
 +
      <let name=links.out append copy=pg_title />
 +
      <let name=links.out append>]]</let>
 +
    </else>
 
     <let name=exclude val=0 />
 
     <let name=exclude val=0 />
 
     <let name=links.rtn append copy=links.out />
 
     <let name=links.rtn append copy=links.out />

Revision as of 01:13, 4 October 2008