Pregunta

Basically we currently have a multisite setup on a single sitecore installation. Thus we have a structure like this under the content node:

  • Site 1
    • Content 1
  • Site 2
    • Content 2

Now of course we wish to reuse our templates as much as we can so we would have a template like this:

Templatename: Webpage
Sections: Data
Fields: Title, Body, Image

Now for the "Image" field source we would set it to something like /Media Library/Images normally but since we have 2 seperate sites we wanted to mirror the structure in the media library as well like:

  • Media Library
    • Site 1
      • Images
    • Site 2
      • Images

But how would we go about defining the source then on the template?

¿Fue útil?

Solución

There are no easy way to accomplish what you want. You have to overwrite "Sitecore.Shell.Applications.ContentEditor.Image" with your own copy off that class.

Then rewrite most of the BrowseImage method, and find some way to select what path it should pick.

You also have to do that to the command "webedit:chooseimage", if you support webedit.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top