Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-09-24 17:55:46

MarcoK
Plugin Author
From: Como
Registered: 2006-10-17
Posts: 248
Website

Obtain $rs variable in admin-side plugin

Hi at all.

In my plugin, i need to get a variable of a custom field.

But, I need this variable, into a function that i call by ajax in write tab.

I can put the variable value, into a ajax calling but when I call the function that insert my js code into a head of page, by the callback, i don’t know how grab the $rs or other variable/array that allow my use the custom_field value.

Someone can help me?

Thanks

Offline

#2 2012-09-26 04:48:23

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: Obtain $rs variable in admin-side plugin

If all else fails, you can always grab the current article’s id and retrieve any article field from the database.

Look here and here for a part of the core which works similarily.

Offline

#3 2012-09-29 08:30:24

MarcoK
Plugin Author
From: Como
Registered: 2006-10-17
Posts: 248
Website

Re: Obtain $rs variable in admin-side plugin

Thanks robert.

I have solved insert the CF value into a JS variable sending via POST by ajax call to the function.

Last edited by MarcoK (2012-09-29 08:30:44)

Offline

Board footer

Powered by FluxBB