[TYPO3] anchor tags
Cate & Peter
catepeter at optusnet.com.au
Thu Dec 13 14:03:16 CET 2007
Hi again,
Still working out these typolinks for anchors ...
Christopher wrote:
### Typoscript:
###
lib.skipnavigation = HTML
lib.skipnavigation {
### The link text:
###
value = Skip to content
value {
typolink {
### Create a link to the current page:
###
parameter.data = field:uid
### Link to a specific anchor:
###
section = content
}
}
}
Cate:
I pasted the above TS into the template, and mapped lib.skipnavigation, but
nothing was rendered from it - no text, no link. I have no idea if I
completely misunderstood Christopher... I don't know what I don't know, so
to speak.
Anyhow, after much fiddling, I did get the text showing, but the only way I
could get a link was by wrapping an <a href> tag around - if there is no
wrap, there is no link, which seemed very wrong to me...
This is what I have done...
lib.skipnavigation = CONTENT
lib.skipnavigation{
table = tx_drwiki_pages
select {
pidInList = this
selectFields = pid, keyword
}
renderObj = TEXT
renderObj {
required=1
# Displays the keyword inside the <li/> tags
value = Skiplink to content
# Inner wrap around individual rows
wrap=<li class="access_links">|</li>
# Wraps the keyword with a link to the correct page
typolink {
# Links to the page that the wiki keyword is found on
parameter.data = field:pid
# Adds the keyword to the query string
additionalParams.wrap = &tx_drwiki_pi1[keyword]=|
additionalParams.data = field:keyword
#add the anchor
section = Content
}
}
}
Which works ... except...
It wants to make links for every wikipage, and list them all on every page
as multiple "skiplink to content" links.
Is there not some way to retrieve the exact url as it appears in a page,
including the extra parameters, and plug it into the code to just add the
anchor? Something like $GLOBALS["TSFE"]?
Regards
Cate
More information about the TYPO3-english
mailing list