# Using Page\_Attachments in custom extensions

**URL:** <https://www.ruby-forum.com/t/using-page-attachments-in-custom-extensions/134979>\
**Category:** Radiant CMS\
**Created:** [April 16, 2008, 7:23pm UTC](https://www.ruby-forum.com/t/using-page-attachments-in-custom-extensions/134979 "2008-04-16T19:23:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dpitman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a9adbd/32.png) [@dpitman](https://www.ruby-forum.com/u/dpitman)\
**Post date:** [April 16, 2008, 7:23pm UTC](https://www.ruby-forum.com/t/using-page-attachments-in-custom-extensions/134979/1 "2008-04-16T19:23:31Z")

</div>

I’m building a few extensions for a client project and would like to tie  
Page\_Attachments and WYMeditor into the new/edit screens of my  
extensions. Currently Shards allows these two extensions to integrate  
with Radiant’s page editing tools, but how would I get them to play nice  
with my custom admin screens?

Any pointing-in-the-right-direction would be appreciated. Thanks!

- Dave

---

<div class="post-metadata">

**Author:** ![dpitman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a9adbd/32.png) [@dpitman](https://www.ruby-forum.com/u/dpitman)\
**Post date:** [April 17, 2008, 5:18pm UTC](https://www.ruby-forum.com/t/using-page-attachments-in-custom-extensions/134979/2 "2008-04-17T17:18:23Z")

</div>

David P. wrote:

> I’m building a few extensions for a client project and would like to tie  
> Page\_Attachments and WYMeditor into the new/edit screens of my  
> extensions. Currently Shards allows these two extensions to integrate  
> with Radiant’s page editing tools, but how would I get them to play nice  
> with my custom admin screens?
> 
> Any pointing-in-the-right-direction would be appreciated. Thanks!

I guess what I am really asking is if I can take advantage of these  
existing plug-ins, or if I need to use attachment\_fu and wymeditor on  
their own in my new extensions. I’m assuming the latter, right?

---

<div class="post-metadata">

**Author:** ![dpitman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a9adbd/32.png) [@dpitman](https://www.ruby-forum.com/u/dpitman)\
**Post date:** [April 17, 2008, 5:43pm UTC](https://www.ruby-forum.com/t/using-page-attachments-in-custom-extensions/134979/3 "2008-04-17T17:43:56Z")

</div>

On Thu, Apr 17, 2008 at 5:18 PM, David P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> I guess what I am really asking is if I can take advantage of these  
> existing plug-ins, or if I need to use attachment\_fu and wymeditor on  
> their own in my new extensions. I’m assuming the latter, right?

I think you could inject a javascript file in the edit page from your  
extension that add some functionality.  
For example from your js you could add a button near the name of  
each attachment that add it in the editor.  
Is that what you need?

–  
Andrea F.  
[http://gravityblast.com](http://gravityblast.com) - [http://nimboo.net](http://nimboo.net)

---

<div class="post-metadata">

**Author:** ![dpitman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a9adbd/32.png) [@dpitman](https://www.ruby-forum.com/u/dpitman)\
**Post date:** [April 17, 2008, 11:51pm UTC](https://www.ruby-forum.com/t/using-page-attachments-in-custom-extensions/134979/4 "2008-04-17T23:51:32Z")

</div>

Andrea F. wrote:

> On Thu, Apr 17, 2008 at 5:18 PM, David P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> wrote:
> 
> > I guess what I am really asking is if I can take advantage of these  
> > existing plug-ins, or if I need to use attachment\_fu and wymeditor on  
> > their own in my new extensions. I’m assuming the latter, right?
> 
> I think you could inject a javascript file in the edit page from your  
> extension that add some functionality.

That could work for getting WYMeditor in place. I’ll try that tomorrow.  
Thanks!
