The field url
in the pages
record does not hold the url from that page in general.
It is used only for pages of type external URL
, so the internal link to this page can be forwarded to that url.
If you want a link list of all your pages you need to create a link to these pages:
99 = CONTENT
99 {
table = pages
select {
// your selection here
}
renderObj = TEXT
renderObj {
typolink {
parameter.field = uid
}
}
}
This will give you a list (if wrapping the renderObj
with <li>|</li>
) of complete links with page title as link text.
If you want only urls you can add:
typolink {
returnLast = url
}
Without wrapping it will be a long string without separation.
EDIT:
99 = CONTENT
99 {
table = pages
select {
pidInList = 69
orderBy = crdate desc
}
wrap = <ul>|</ul>
renderObj = TEXT
renderObj {
wrap = <li>|</li>
typolink {
parameter.field = uid
}
if.isFalse.cObject = CONTENT
if.isFalse.cObject {
table = pages
select {
// this 'uid' is from context of current pages record we have selected above
pidInList.field = uid
// this 'uid' is the field from the records we are selecting here
selectFields = uid
}
renderObj = TEXT
// this 'uid' is the selected field above
// a field in the pages record of the subquery to decide if there are child pages
renderObj.field = uid
# renderObj.wrap = |,
}
}
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…