[TYPO3] anchor tags

Christopher Torgalson bedlamhotel at gmail.com
Fri Dec 14 09:39:32 CET 2007


Hi,

Cate & Peter wrote:
> Hi Christopher
> 
>> I just tested the TS I sent you to double-check, and it works just as
>> intended. The *only* thing that could make that TS fail is if somehow
>> there is no value for the 'field:uid' bit--but even then, the thing is
>> an ordinary HTML cObject, so you should still see the text--which is
>> what it sounds like you're describing.
> 
> Isn't that weird. I wonder if I could have something set somewhere that is
> interfering with it? I also found that with 
> 
>>> 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
>>>
>>>     }
>>>   }
>>>
>>> }
> 
> As soon as I disable the additionalParams lines, the whole thing doesn't
> work. I get the link text, but no link. So back to what you gave me, with
> some tweaking...
> 
> #accessibility links
> 
> lib.skipnavigation = COA
> lib.skipnavigation {
> 	10 = HTML
> 	10.value.dataWrap = <li class="access_links"> | </li>
>         10.value = Skiplink to content
> 	10.value.typolink {
> 				### Create a link to the current page:
> 				parameter.data = field:uid
> 				### Link to a specific anchor:
> 				section = Content
> 				}
>                                       
> 		
>  }



This is more like what I gave you some days ago. What about the TS from 
yesterday? It specifically generates a link to the current page 
including *all* GET params in the URL--it works with tt_news, so it 
should also work in your case.



> Denis Royer helped out by suggesting
> 
> config.baseURL = http://www.deafhub.com
> config.prefixLocalAnchors = output
> 
> But its not helping.
> 
> I did find 
> 
> 20 = TEXT
> 20.field = title
> #20.typolink.parameter.field = uid
> 20.dataWrap = <span class="menu-left-title"><a
> href="index.php?id={field:uid}#{field:title}">|</a></span>
> 20.fieldRequired = title
> 
> (http://kaptao.com/index.php?id=25&L=2&tx_mmforum_pi1[action]=list_post&tx_m
> mforum_pi1[tid]=5), but I cant understand why you would need to link with an
> a href if it is supposed to be a typolink?


Answer: because you don't know about typolink ;-)

The TS above will always create links in that form even if you enable 
RealURL or simulateStaticDocuments. Typolink generates links in the form 
specificed by the system. The TS above would also need to be coupled 
with something that was generating something that output the current 
page's title in an anchor or id attribute--but I think it'd be doomed to 
fail as soon as somebody made a page in the system with two words (the 
space would mess things up I think...)


-- 
Christopher Torgalson / bedlamhotel at gmail.com


More information about the TYPO3-english mailing list