Need 'back to article' link from image page

Author Message

Arne Schirmacher

Thursday 04 March 2004 12:38:44 pm

I want to create an article with several images. By clicking an image one should get to a page with the image in original size, plus a link for returning to the article, similar to what one could do in ezpublish 2.x. I would like also to have other links "next/previous picture in the current article".

Questions:

1. What is the best way to organize several images per article? Currently I duplicate the article tree structure in the media folder so that I have a folder having the same name as the article which holds all images. But I would rather attach the images to the article somehow.

2. How can I get the link to the original article in the image template?

Please advise.

Paul Borgermans

Thursday 04 March 2004 1:20:27 pm

Ah, you will need a 3.4 functionality for this (variable passing between templates). Maybe this should be backported to 3.3 since 3.4 final is still a long way (hey ez crew, it is stable for me and working fine in a production server for really weird things!).

1. Related objects is your friend here

2. Template variable passing, certainly if more than one article uses one or more common image(s). Referrers also won't help if you thought about that in a prev|next scheme. Alternatively, you could use the user/preference variable sysem, but you will need to turn of view caching in the templates you use for this. And it may cause side effects as this variable is stored accross page views.

-paul

 

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Arne Schirmacher

Thursday 04 March 2004 10:03:48 pm

Re 1.:
I am in fact using related objects here but it is cumbersome because I a now duplicating the article folder hierarchy in the media folder. I could of course throw all images into one media folder but this would be messy after time and also I can't easily solve the "view all images of this article" problem.

Is it possible to attach images (better, any objects) to an article? I believe I have seen this in an earlier release ov ezpublish 3, maybe a beta. If I remember correctly then in the admin - content area both folders and articles had the same ability to add sub-objects. So it was possible to put images "into" an article just as into a folder. I remember thinking "Wow, what a smart concept" at that time but I can't find this functionality in the current release.

Re 2.:
I will gladly beta-test your code if you backport it from 3.4 :-)

Paul Borgermans

Friday 05 March 2004 1:59:51 am

1. Yes you can create child objects to your article which can be anything, including images. This may well be a good solution because than you can easily back-link to your article (the parent node!)

2. This involves pulling a few files from svn at a certain revision. I may post the ones that are valid for 3.3-3 if this helps (you need to be very careful as this may break other functionality).

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.