Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2018-04-19 17:36:10

dima
Member
Registered: 2010-11-21
Posts: 27

Sticked post on main page.

Hello.
I have use Textpattern CMS 4.6.2 with default theme. I need to keep one message on the top of the main page. How to do it?

Offline

#2 2018-04-19 18:52:54

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,305

Re: Sticked post on main page.

Choose “Sticky” from the status menu on the Write panel for that article, and add a <txp:article_custom status="sticky" /> tag to your page.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#3 2018-04-19 19:06:16

dima
Member
Registered: 2010-11-21
Posts: 27

Re: Sticked post on main page.

Thanks.

Offline

#4 2018-04-21 13:15:58

dima
Member
Registered: 2010-11-21
Posts: 27

Re: Sticked post on main page.

Unable to repeat it in Textpattern 4.7.0-beta.3
<txp:article_custom status=“sticky” /> in default page template

Last edited by dima (2018-04-21 13:16:43)

Offline

#5 2018-04-21 13:26:42

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,305

Re: Sticked post on main page.

Sorry, can you give us some more info, please? What did you do? What did not work? Which code did you use (more context, please) Were there errors? If so which? etc.

Unable to repeat it in Textpattern 4.7.0-beta.3

A new database? Have you created a sticky article?

If you’re using the standard page template (unchanged), then just add your tag right above each of the three(!) article tags.

Last edited by uli (2018-04-21 13:40:21)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#6 2018-04-21 13:39:17

dima
Member
Registered: 2010-11-21
Posts: 27

Re: Sticked post on main page.

There is post with status “sticky”. I expect this one post on main page only.
From main menu I switch to “Pages”, then choose “default”. Here is relevant part of the default page: <!— else is this an article category list? —> <txp:if_category>

<h1 itemprop=“name”> <txp:text item=“category” /> <txp:category title=“1” /> </h1> <!— <txp:article form=“article_listing” limit=“5” wraptag=“ul” class=“article-list” /> —> <txp:article_custom status=“sticky” /> <txp:else />

Last edited by dima (2018-04-21 13:40:12)

Offline

#7 2018-04-21 13:44:05

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,305

Re: Sticked post on main page.

While you were writing I’ve amended my post. Please have a look at where it says “three article tags”.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#8 2018-04-21 15:14:41

dima
Member
Registered: 2010-11-21
Posts: 27

Re: Sticked post on main page.

Everything new, database too.Post created with sicky status in articles section.
It looks like our tag should be placed in right place in the template. “Right” place seem to be <!— else display articles normally —> <txp:else />

<!— links by default to form: ‘default.txp’ unless you specify a different form —> <txp:article_custom status=“sticky” /> <txp:article limit=“5” /> </txp:if_author> </txp:if_category>

Offline

#9 2018-04-21 15:53:34

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,305

Re: Sticked post on main page.

dima wrote #311276:

“Right” place seem to be

So it’s working now in your 4.7.0 beta3? Congratulation!


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#10 2018-04-21 15:56:36

dima
Member
Registered: 2010-11-21
Posts: 27

Re: Sticked post on main page.

Yes, it work.

Offline

Board footer

Powered by FluxBB