Recent Topics

Get current page title with API

Started by on May 28, 2008 – Contents updated: May 28, 2008

May 28, 2008 12:15    


I'm a developper of an open source web analytics software (

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 B2Evolution API and if I can use it in an external marker ?


May 29, 2008 16:27

No one can help me about this issue ?

Thank you.

May 29, 2008 19:30

Hi there,
The title in the skin is created by this section of code :

		// ------------------------- TITLE FOR THE CURRENT REQUEST -------------------------
		request_title( array(
			'auto_pilot'      => 'seo_title',
		) );
		// ------------------------------ END OF REQUEST TITLE -----------------------------

AFAIK there is no easy way to "grab" the value without resorting to ob_start();

request_title( array(
	'auto_pilot'      => 'seo_title',
) );
$the_title = ob_get_clean(); // don't use $title or you'll cause errors with links on the page ;)


May 29, 2008 20:35

Great, I think I will use the second one.

I'm doing almost the same thing for Dotclear 1.

Thank you.

May 29, 2008 20:44

No problem, feel free to post back if you need any more help .... and don't forget to let us know when your plugin is ready ;)

I for one have always wanted to see my stats in french ..... probably make about as much sense as when they're in english :-S


May 29, 2008 20:56

I think I will post a link to download the BETA tomorrow or next week :)

The web site is in french but the software is localised in FR, EN, IT and DE, it could be better for you :)

Jun 03, 2008 20:23


You can tnow download the BETA version and set the type of CMS as B2Evolution in the administration panel.

I hope everything works fine in the english version, if not, see the tab "administration" or send us an email via the support page :

Download BETA version :
More infos in french :

Form is loading...

Advanced CMS – This forum is powered by b2evolution CMS, a complete engine for your website.