I'm looking for an improved way for our editors to easily edit a photo
gallery. Current method is the bog standard way :
- Template A has a container that allows creation of pages from
Template B
- Template B has 2 image elements - one for the main and the other for
the thumbnail
Template B's images reference different folders (one for the large and
one for the thumbnails)
I'd like a way to automatically create thumbnails from the main image
and store it within the thumbnail's asset manager folder. The image
editing within Asset Manager works fine but results in the editors
having to go through a number of steps which I know they will probably
get wrong!
I'm well aware of the very simple alternative of using an attribute
element referencing the main image but due to creative the thumbnail
image has to be 77x77 which isn't possible (unless anyone knows how to
add in more options here ???)
Before I start reinventing the wheel just thought I'd see if anyone
else has done anything similar with a plug-in?
Thanks in advance
Helen
Yes, there is a solution, and it is a slight extension of what you
have mentioned.
Thumbnail image placeholder references Full image placeholder.
Thumbnail image placeholder has placeholder setting of automatic image
resize (it is done via ImageMagik on server side) to your desire
width.
You will then ask, "Then for each of these image module pages, I will
have to manually reference the images?"
Answer: yes, unless you have a plugin that retroactively references,
and automatically reference on page open, both I had written. Please
let me know if the solution works for you. If so, we can talk about
delivery of the plugin.
Best,
-Jian
I'm really pleased with the the render tag solution in the case of a 1
full sized to 1 thumbnail image ratio. It works brilliantly!
And sorry Jian I should have made it more obvious that I was aware of
the scaling option but I was trying to not have to use any rql.
However I think I'm going to have to use RQL as in one of our
templates we have a full sized image and 6 other ones of varying
smaller dimensions. As long as I can confirm that the dimensions will
be in the same proportion (so that they scale nicely) then I'm going
to write a plug-in that the user has to activate to copy over the
contents of the main image to the 6 other images.
Glad you found a solution.
Please note the usage of Elements.GetElement rendertag reduced page
load time and general project performance because the entire page
object need to be loaded into memory prior to element inspection. The
usage is generally not recommended by OpenText Consultant services and
is considered a project red flag.
Also, Element.GetElement has the rendertag cache issue. Sometimes,
when image placeholder is updated, the rendertag still use the cache
placeholder content instead of new content.
RQL: I would probably recommend the other 6 placeholders reference the
original image placeholder, instead of copying the image over 6 times
because reference once and it is done, if copy, then copy operation
needs to be done each time the content changes.
Just want to share my experience and hope other people can avoid the
pitfalls.
Best,
-Jian
In regular content classes, it is best to stick with regular
placeholders.
-Jian
I presume it's the same effect for
Context:CurrentMasterPage.Elements.GetElement ??
Yes, that rendertag too.
-Jian