Developer forum

Forum » Templates » Using meta tags on images outside Image gallery?

Using meta tags on images outside Image gallery?

Per Søgaard
Reply

We would like to be able to use image metadata everywhere. It seems to be only working in the image gallery?
How can we use it on images otside the gallery module?


Replies

 
Vladimir
Reply

Hi Per,

It seems only way is to create a template extender

Then you can add metadata tags to any file with:

 Dynamicweb.Content.Files.Metadata.EditorFactory.AddFileMetadataToTemplate(ByVal filePath As String, ByVal template As Dynamicweb.Rendering.Template, ByVal tagPrefix As String)

or receive metadata to a file:

 Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(ByVal file As String) As Meta

 

Best regards,

Vladimir

 
Per Søgaard
Reply

I think you are missing my point.

In the file archive you can add meta tags to images.

The mata tag can be shown in a template in the image gallery module:
http://templates.dynamicweb.com/TemplateTags/Dynamicweb-template-tags/Module-tags/Gallery/Loops/Images/Gallery-Image-Metadata-title.aspx

I would like to show the meta tag on a image on images everywhere i need it.

How can i do this without any backend coding, just using a DW tag?

 
Vladimir
Reply

it's not possible with DW tag

 
Per Søgaard
Reply

But it should be - the tag from image gallery just needs to be global.

 
Vladimir
Reply

hmm... maybe I misunderstood something...
You can make some paragraphs(hidden) with Image Galeries
And insert their content any where you want with tag: Global:Paragraph.Content([ID])

 
Per Søgaard
Reply

See:
http://manual.dynamicweb-cms.com/Default.aspx?ID=6625
Scroll to system metafields

Publish meta tags with:
http://templates.dynamicweb.com/TemplateTags/Dynamicweb-template-tags/Module-tags/Gallery/Loops/Images/Gallery-Image-Metadata-title.aspx #sthash.lfGiW6Yf.dpuf

 
Nicolai Høeg Pedersen
Reply

Hi Per

I understand what you want to do - but it is not that simple unfortunately. Do you have specific places in particular where you are missing the feature?

BR Nicolai

 
Per Søgaard
Reply

We have made our own item based image gallery and would like to use the meta tags in it.

The DW image gallery generates a lot of thumbnails filling up the file archive which we would like to avoid.
And with the item based  version we can set up user configurable time, transitions, random, overlay etc. 

For now that is it but who knows ;-)

 
Per Søgaard
Reply

Can I make a Gallery template that does not generate all these thumbnail images?

 
Nicolai Høeg Pedersen
Reply

Hi Per

No, the gallery will generate the thumbs. but set them to 1x1 px and they will not take up a lot of space.

BR Nicolai

 
Per Søgaard
Reply

So there is no way to avoid it - even if I only use original size images and use getimage to scale them....?

 
Nicolai Høeg Pedersen
Reply

That is true.

 

You must be logged in to post in the forum