Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2024-05-09 21:58:07

skewray
Member
From: Sunny Southern California
Registered: 2013-04-25
Posts: 197
Website

html_id with link_to_home

When I add html_id="stuff" to txp:link_to_home, I don’t get anything additional in the HTML. According to the current online documentation, I should get id="stuff" in the HTML, right? Adding class="stuff" works fine. Running Txp 4.8.8.

Last edited by skewray (2024-05-09 22:01:44)

Offline

#2 2024-05-10 03:45:49

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,187
Website

Re: html_id with link_to_home

Are you also using the wraptag attribute? The docs say (about html_id) HTML id to apply to the wrapper.

<txp:link_to_home html_id="stuff" class="stuff2" wraptag="p">Home!! </txp:link_to_home>

generates this:

<p id="stuff">
   <a class="stuff2" rel="home" href="https://example.tld/">Home!! </a>
</p>

If you omit the wraptag attribute, then the html_id is ignored.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#3 2024-05-10 04:58:59

skewray
Member
From: Sunny Southern California
Registered: 2013-04-25
Posts: 197
Website

Re: html_id with link_to_home

Yup, you nailed it. I didn’t specify wraptag. I knew it was something dumb on my part.

Offline

Board footer

Powered by FluxBB