Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-08-26 20:53:58

igner
Plugin Author
Registered: 2004-06-03
Posts: 337

Determining context for tag

Is there a way to determine under what context a tag was called (i.e. form vs page vs article)?

I’ll be poking through the code this weekend, but I’m hoping someone here has a quick and simple answer. By way of explanation, I want to be able to provide a tag to set a page-wide privilege level for tags in my password_protect plugin (so that privilege levels only have to be set once for a page, rather than tag by tag as is the case currently). My thought was to use a tag, placed in the page template to populate a global value, which can then be overridden at the tag level if needed. The potential problem is that if there are multiple elements that contain this global tag, with differing values, I can see all sorts of hinkiness happening.

However, if there’s a way to determine under what context the tag’s being called, I could then create a cascading set of privileges as the page is created.

Any thoughts would be greatly appreciated.


And then my dog ate my badger, and the love was lost.

Offline

Board footer

Powered by FluxBB