Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-02-11 16:42:07

cap_nemo
Member
Registered: 2005-04-20
Posts: 33
Website

In a Plug-in Pull the current ID of the article that is displaying?

I need to modify a plug-in and I want to query against the current article ID. Is there an easy was to get that? Should i use safe_rows()?

Thanks.

Offline

#2 2006-02-11 17:38:46

larf
Archived Plugin Author
Registered: 2005-01-31
Posts: 159
Website

Re: In a Plug-in Pull the current ID of the article that is displaying?

Put this in your plugin cache dir:
<code>
<?php
function vdh_articleid($atts) { global $thisarticle; return $thisarticle[‘thisid’];
}
?>
</code>

Then you can use this tag to show the article id:
<txp:vdh_articleid />

Offline

#3 2006-02-11 18:08:30

cap_nemo
Member
Registered: 2005-04-20
Posts: 33
Website

Re: In a Plug-in Pull the current ID of the article that is displaying?

How would i use this inside the actual plug-in PHP to return the article ID value?

UPDATE

Nevermind.. i figured it out… :)

Last edited by cap_nemo (2006-02-11 19:07:59)

Offline

Board footer

Powered by FluxBB