Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2016-11-05 10:41:36

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,630
Website

Re: mysql_fetch_array missing in Txp 4.6.x—How can I fix my template?

etc wrote #302673:

Thanks, Philippe, but this sounds contradictory for me:

That’s exactly what I suggest. I consider the final and as purely presentational, it shouldn’t be in the code. What if we decide to output and last but not least instead, should Google reindex the page?

good morning Oleg,

Ok, I’ve misunderstood you then, we are on the same wave I think.


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

Offline

#17 2016-11-05 13:56:12

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,630
Website

Re: mysql_fetch_array missing in Txp 4.6.x—How can I fix my template?

etc wrote #302660:

[…] but I’m sure CSS-minded people here can help you to do it with some combination of nth-child and before:|after: selectors.

This (assuming an ol/@li@ combo) is all you need:

li { display: inline; }
li:not(:last-child)::after { content: ', '; }
li:nth-last-child(2)::after { content: ' and '; }

This works for a list of one or more authors.


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

Offline

#18 2016-11-05 16:50:58

etc
Developer
Registered: 2010-11-11
Posts: 5,661
Website GitHub

Re: mysql_fetch_array missing in Txp 4.6.x—How can I fix my template?

Nice! Another possibility

li { display: inline; }
li+li::before { content: ', '; }
li+li:last-child::before { content: ' and '; }

Offline

Board footer

Powered by FluxBB