21308 Posts in 5737 Topics by 2603 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 964 Views |
-
currentPageID() for unique names?

18 February 2009 at 1:39pm Last edited: 18 February 2009 1:45pm
I am trying to use currentPageID() in a widget I am building, in order for the widget to be installed on several different pages (without having to manually set a unique id). I thought that currentPageID() would do the job, however, I cant get it to work.
Here is the code in question
function pageID() {
return currentPageID();
}I am obviously using this wrong, but I cant find any examples of it being used. Is there an easier way to have a unique page id?
-
Re: currentPageID() for unique names?

14 May 2009 at 1:50pm
I have no idea about writing widgets, so this might be totally unhelpful, but...
can you just use $this->ID (in the code) or $ID in the template.
And in your code, shouldn't it be $this->currentPageID() ?
| 964 Views | ||
|
Page:
1
|
Go to Top |


