Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2018-02-10 19:44:56

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 805
Website

A title for the main article and another on for the excerpt ... how?

I did asked the same question years ago but maybe there is a new and better way to do it. Is there? Core, plugin?

Last edited by RedFox (2018-02-10 19:45:46)

Offline

#2 2018-02-11 04:36:14

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

Re: A title for the main article and another on for the excerpt ... how?

A custom field would be my first choice.


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

Offline

#3 2018-02-11 07:13:29

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,032
Website GitHub Mastodon Twitter

Re: A title for the main article and another on for the excerpt ... how?

Or you could add the title within the excerpt if it makes sense to your brief.

Something like

h2. Excerpt title

Excerpt here

Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#4 2018-02-12 08:19:54

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 805
Website

Re: A title for the main article and another on for the excerpt ... how?

That’s a nice one Yiannis … :)

For now a custom field it will be. Thanks to you both.

<txp:if_custom_field name="Alt_Article_Title">
<h1 itemprop="name"><txp:custom_field name="Alt_Article_Title" /></h1>
<txp:else />
<h1 itemprop="name"><txp:title /></h1>
</txp:if_custom_field>

Last edited by RedFox (2018-02-12 09:50:38)

Offline

#5 2018-02-12 16:06:44

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,150
GitHub

Re: A title for the main article and another on for the excerpt ... how?

phiw13 wrote #309183:

A custom field would be my first choice.

Seconded. I’ve recently started to cram more than one thing into custom fields and then extract the information using variable. I’m sure I can use yield for some of this, too.

Offline

#6 2018-02-12 17:03:47

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 805
Website

Re: A title for the main article and another on for the excerpt ... how?

Show us some code Pete … :o

Offline

#7 2018-02-12 19:12:20

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,379
Website GitHub Mastodon

Re: A title for the main article and another on for the excerpt ... how?

RedFox wrote #309208:

Show us some code Pete … :o

This may be useful: get the value of a custom field in a variable

Offline

Board footer

Powered by FluxBB