Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Where To Make A Global?

Quote Reply
Where To Make A Global?
I need a global... but it is a "Super" global. I need to access it everywhere... on Detail, in other globals, on Cat pages... everywhere. Essentially, it is the "Title" field, but modified. I used the modified Title field in a number of ways, and have 5-10 different globals now to accomplish this. There are 20-30 steps in modifying Title to make it correctly mofified... and that takes up a few lines of code in each global.

I thought if there were somewhere deep in Links I could put this all in perl, and then just call it where ever I needed it as <%mod_Title%> (or even $rec->{'mod_Title'} in other globals), I could make sure all versions are using the correct and current modifications...

Does that make sense?

I thought about in Site_HTML in the detail page, but I need it other places than JUST Detail...

Thanks!
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] Where To Make A Global? In reply to
You could try making a plugin which would hook in on the appropriate hooks, such as build_detailed, build_category etc

Alternativly, you could put them in a plugin such as TitleRename.pm and then just have a function in there which you would call with <%Plugins::TitleRename::FunctionName($Title)%>

Hope that helps

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] Where To Make A Global? In reply to
Yes, Andy, that does help.... I think method two will be where I go.

Cheers and Thank you....

Dave
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] Where To Make A Global? In reply to
Hi Dave,

Maybe this one is of some importance. I use a Plugin hook with init:
http://www.gossamer-threads.com/...?post=310600#p310600
Andy and Adrian really helped me there.

Regards

n||i||k||o