1
bastienb
Get current page title with API
  • 2008/5/28 9:55

  • bastienb

  • Just popping in

  • Posts: 4

  • Since: 2008/5/28


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

Regards,
Bastien.

2
bastienb
Re: Get current page title with API
  • 2008/5/29 14:23

  • bastienb

  • Just popping in

  • Posts: 4

  • Since: 2008/5/28


No one can help me about this issue ?

Thank you.
Bastien.

3
trabis
Re: Get current page title with API
  • 2008/5/29 17:25

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


I´m not shure I understand what you want.
Do you want to know what is the page title of the site from a module you are doing? From an external software? Can you give an better example on how you doing it with wordpress?

4
bastienb
Re: Get current page title with API
  • 2008/5/30 8:36

  • bastienb

  • Just popping in

  • Posts: 4

  • Since: 2008/5/28


Yes, I would like to get the title of the current page from an external webapps developped in PHP.

The wordpress function wp_title() return the title of the current page and I would like to know if there is something similar in XOOPS.

Thanks.
Bastien.

5
zyspec
Re: Get current page title with API
  • 2008/5/30 12:50

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


I believe most developers use a class to get this information. XOOPS theme developers typically use a Smarty tag.

Since I don't know exactly what you're doing you might also consider using the document.title DOM property. Something like:
<body>
The title of the document is
<
script type="text/javascript">
document.write(document.title)
script>
body>

6
bastienb
Re: Get current page title with API
  • 2008/5/31 12:36

  • bastienb

  • Just popping in

  • Posts: 4

  • Since: 2008/5/28


As I say, it could not be done in JS because the stats marker is included in PHP and executer on server side.

Login

Who's Online

489 user(s) are online (360 user(s) are browsing Support Forums)


Members: 0


Guests: 489


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits