Re: Handling retina images

111 views
Skip to first unread message
Message has been deleted

Hilmar Bunjes

unread,
Apr 30, 2013, 10:59:20 AM4/30/13
to reddot-c...@googlegroups.com
Hi Neil,
At present, we use 800x450 images for news articles. I'd like to start using 1600x900 versions for higher quality retina devices but generate the smaller 800x450 version automatically from this image.

This can be done when pulling through the image to a list, where you specify the scaling restrictions but is it possible to do within a template? I tried referencing a new image element to the original and setting scaling but it just kept the original file.
 
 
This should work as described. You create two image placeholders (e.g. img_large and img_small) and reference one from the other (img_small -> img_large). Then you set img_large to the image you want to and img_small will display the same image. If you now set the scaling of img_small to a smaller size, img_small will scale down this image. In the end you will have two images in your page, the large and the small one (the small one with "rdax_..." in the name).
 
The same procedure is also done with thumbnails for images that show the large one by clicking on it.
 
Best,
Hilmar Bunjes
Message has been deleted

Tim D

unread,
Apr 30, 2013, 1:11:07 PM4/30/13
to reddot-c...@googlegroups.com
You can't pre-assign at the template only at the page instance level. At least in 10 you couldn't pre-assign the reference on the content class.  

On Tuesday, April 30, 2013 11:32:36 AM UTC-4, Neil Fegen wrote:
Hi Hilmar

Thanks for the reply.

So, in the template, I put img_large in the clipboard, chose img_small and selected 'Reference Element in Clipboard'. Nothing visually happens - there are no green arrows or text to indicate the reference like you would normally see.

When I create a new page and add img_large, nothing happens for img_small. I have to repeat the above 'Reference Element' step and then it works (green text, etc.) - there is the 1600x900px img_large and 800x450px img_small

However, I don't want to perform this manual step every time - it should be set once at template level and that's it for all new pages.

Does this sound it should work at template level?
Message has been deleted

Daniel Petroff

unread,
May 1, 2013, 7:11:50 AM5/1/13
to reddot-c...@googlegroups.com
Hi

I didn't have time to read the whole thread but if I am getting it right you are looking to have editors upload one image (high res) and the template to generate two images, one large and one small and publish both out?

You can try the following:

<%img_ArticleImage%> = the placeholder that your editors will populate. The editors will select the full size image but the placeholder is set to resize it down to smaller size.

Then where you need the full sized image you use a render tag to GetHtml() of the same placeholder. The Render tag gets the image before it gets resized. <%!! Context:CurrentPage.GetElementByName(img_ArticleImage).GetHtml() !!%>

Hope this makes sense and is what you were looking for.

Kind Regards
Daniel



On Wed, May 1, 2013 at 11:41 AM, Neil Fegen <n.fe...@gmail.com> wrote:
Hi Tim

Thanks, although that's pretty depressing - will have to use some RQL now as can't have editors doing it manually...

--
You received this message because you are subscribed to the Google Groups "RedDot CMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reddot-cms-use...@googlegroups.com.
To post to this group, send email to reddot-c...@googlegroups.com.
Visit this group at http://groups.google.com/group/reddot-cms-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Message has been deleted

Daniel Petroff

unread,
May 1, 2013, 10:05:56 AM5/1/13
to reddot-c...@googlegroups.com
Cool. Let me know. It should work because it's working in one of my project right now :)



On Wed, May 1, 2013 at 3:04 PM, Neil Fegen <n.fe...@gmail.com> wrote:
Hi Daniel

Yes, I'd like editors to upload the eg 1000px width version and then the CMS to make a second version at eg 500px width - your idea sounds like exactly what I'm looking for.

Thanks, I'll report back if it works!

Cheers
Message has been deleted

Tim D

unread,
May 2, 2013, 3:45:00 PM5/2/13
to reddot-c...@googlegroups.com
Understood. You can vote for it by asking Sup...@opentext.com to note that your company wants Feature Request WSGREQ-810.


On Wednesday, May 1, 2013 6:41:33 AM UTC-4, Neil Fegen wrote:
Hi Tim

Thanks, although that's pretty depressing - will have to use some RQL now as can't have editors doing it manually...

On Tuesday, 30 April 2013 18:11:07 UTC+1, Tim D wrote:

Hilmar Bunjes

unread,
May 2, 2013, 4:16:04 PM5/2/13
to reddot-c...@googlegroups.com
Hi,
I would not count on this workaround for future versions. For me it sounds like a non-expected behavior. At least I would have expected a down-scaled version of the image from the RenderTag.

Best way in my opinion would either:
- Vote at OpenText for preassignment of elements in Content Classes
- Make an Ajax call from the template in SmartEdit to preassign the template using SmartAPI (www.smartapi.de), any other RQL library or your own RQL implementation.

Best,
Hilmar

Am 01.05.2013 16:19, schrieb Neil Fegen:
Yep, works like a charm :-)

Thanks a lot, great use of render tag!

Neil
--
You received this message because you are subscribed to a topic in the Google Groups "RedDot CMS Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/reddot-cms-users/aLujeUr52SQ/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to reddot-cms-use...@googlegroups.com.
Message has been deleted

Tim D

unread,
Jun 6, 2013, 12:24:35 PM6/6/13
to reddot-c...@googlegroups.com
Neil,

May want to see if this plugin from Jian in this thread will help fill gap for the time being.



On Thursday, May 9, 2013 3:58:11 AM UTC-4, Neil Fegen wrote:
Thanks Tim, have done so now.
Message has been deleted

Tim D

unread,
Jun 21, 2013, 1:56:52 PM6/21/13
to reddot-c...@googlegroups.com
Hmm.  this was supposed to be a link to another thread. And of course I can't find that thread now.

Jian posted a plugin about referencing elements or something of that nature. I'll see if he has it and can put it on his blog.


On Friday, June 7, 2013 3:52:56 AM UTC-4, Neil Fegen wrote:
Hi Tim

Thanks but that just seems to link back to this group?

Neil

On Tuesday, 30 April 2013 11:55:33 UTC+1, Neil Fegen wrote:
Hi

We're starting to look at using retina image alternatives in our project and I wondered what would be the best approach for it?

At present, we use 800x450 images for news articles. I'd like to start using 1600x900 versions for higher quality retina devices but generate the smaller 800x450 version automatically from this image.

This can be done when pulling through the image to a list, where you specify the scaling restrictions but is it possible to do within a template? I tried referencing a new image element to the original and setting scaling but it just kept the original file.

Any help would be great!

Thanks

Neil

Jian Huang

unread,
Jun 21, 2013, 3:19:57 PM6/21/13
to reddot-c...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages