Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-05-28 10:03:06

bastienb
New Member
Registered: 2008-05-28
Posts: 4

Get current page title from API

Hi,

I’m a developper of an open source web analytics software (spongestats.org).

I have developped a new feature for version 3.1 to get the page title from the current page based on an API.
Actually, only Wordpress is integrated but I would like to integrate some other CMS/Blog platforms, so I would like to know if there is an API feature included in MODX that I can use to get the current page title.

For example, in Wordpress, I use the API feature wp_title(‘’,false);

Do you know if something similar is available in the Textpattern API and if I can use it in an external marker ?

Regards,
Bastien.

Last edited by bastienb (2008-05-28 10:07:33)

Offline

#2 2008-05-28 11:20:14

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Get current page title from API

page_title()

Offline

#3 2008-05-28 11:32:03

bastienb
New Member
Registered: 2008-05-28
Posts: 4

Re: Get current page title from API

OK great :)

Does this function do an echo or does it only return the page title ?

Regards,
Bastien.

Offline

#4 2008-05-28 15:15:14

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Get current page title from API

It returns the page title, so you can use it like this:

echo page_title(array());

The array contains the attributes for the <txp:page_title /> tag for which the page_title() function is the tag handler. I forgot that part in my first response.

Offline

#5 2008-05-28 16:28:48

bastienb
New Member
Registered: 2008-05-28
Posts: 4

Re: Get current page title from API

OK great, I will use this.

Maybe I can provide you the BETA to test it on a text pattern platform when it will be release. I believe to do a package at the end of the week.

Offline

#6 2008-06-03 18:20:10

bastienb
New Member
Registered: 2008-05-28
Posts: 4

Re: Get current page title from API

Hi,

You can tnow download the BETA version and set the type of CMS as textpattern in the administration panel.
I hope everything work fine in the english version, if not, see the tab “administration” or send us an email via the support page : http://www.spongestats.org/support/

Download BETA version : http://downloads.sourceforge.net/spongestats/SpongeStats-3.1-BETA1.zip
More infos in french : http://www.spongestats.org/?2008/06/04/38-spongestats-31-beta-1-est-disponible&cos=1

Offline

Board footer

Powered by FluxBB