Posted by joelstein on January 20, 2010 at 10:09pm
Jump to:
| Project: | Custom Formatters |
| Version: | 6.x-1.2 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
(This little module rocks.)
Is there any way to get the theme path in one of the tokens used in the basic editor? I don't know much about tokens, so this might belong in their issue queue. But what I'm envisioning is a token like [theme:directory] so that I can prefix certain URLs and such.
Comments
#1
Seconded - and also second the portion about this module rocking. I hadn't needed to make a custom formatter until just recently, and your module is extremely helpful in this regard!
#2
Hi guys,
Firstly, thanks for the kind words, appreciated :)
As for the tokens, I think it's a great idea and have personally had similar needs myself (a file path minus the files directory so I could use imagecache in my pattern), but I'm not entirely sure if my module is the best place to define the tokens. I will do a bit of research to see if there is already any modules out there defining tokens similar to this and if not I will have to weigh up the options.
In the short term, I highly recommend the Custom Tokens module, it's a great little tool to define your own Token.
Will get back to you with more information as I have it.
Cheers,
Deciphered.
Edit: Of course you could always opt for the advanced formatter editor and use the
path_to_theme(), but you would need to be somewhat knowledgeable of PHP and the Drupal API.#3
While I still believe that this isn't entirely the place for these tokens to be defined, I made the decision to do it anyway.
Additional tokens are:
Will be committed shortly, and I will likely be releasing version 1.3 today.
Cheers,
Deciphered.
#4
Nice! I will be porting the custom formatters on a site about ready to go to production, and I'll be sure to mention your module in my writeup!
#5
Hi geerlingguy,
Sounds good, I'll look forward to it: )
Code committed and 1.3 out now
Cheers,
Deciphered.
#6
Awesome; thanks!
#7
Automatically closed -- issue fixed for 2 weeks with no activity.
#8
I think it would be nice to include in the module a page viewing the current tokens available.
Andy