Skip to main content
If a visitor clicks a preview image in the gallery, they reach the single view. It shows the image in normal size, along with the details about the submitter and the form other customers use to rate the image. The same template also shows all images of a product. Which of the two views appears is determined by the call: with techname the single view, with pi the product gallery. The template is entered in the shop configuration shop.config in the <ProductsInAction> section for the Product parameter. Guide: Offering ProductsInAction

Separating the two views

Both branches belong in the same template. This saves a separate page for the product gallery and keeps design and navigation in one place.
E-PIA_SHOW-SINGLE only applies if the call includes a valid technical identifier. With an unknown identifier, ProductsInAction silently falls back to the product gallery, provided a product index is present. If that is missing too, the page remains empty.

The image and its details

The tags for submitter, date, comment and product are on a separate page: Reference: E-PIA_ (Image data)

Displaying the rating

You specify the graphics themselves in the shop configuration shop.config in the <ProductsInAction> section with the parameters RatingImg-00 to RatingImg-05. They must be located in the benutzer/templates directory.
E-PIA_RatingScoreImg rounds for you. Up to 1.5, the tag chooses RatingImg-01, up to 2.5 the two, and so on; an image that has not yet been rated gets RatingImg-00. So you do not need a case distinction based on the rating in the template.
With a parameter, E-PIA_RatingScoreImg() outputs one specific graphic of the six, regardless of the image’s rating. ~E-PIA_RatingScoreImg(5)~ always returns the graphic for five points, for example for labeling the selection buttons in the rating form.
E-PIA_RatingScore can also be used as a range tag to react to a specific rating. The range applies if the average rating lies within half a point of the value.
E-PIA_RatingScore has no negative range. {!E-PIA_RatingScore(5)} has no effect and then remains unresolved on the page. Instead, check positively for the ratings you want to highlight.
E-PIA_RatingVotes is purely a single tag. There is no {E-PIA_RatingVotes} range for the “already rated” case. Use {E-PIA_RatingScore} without a parameter instead; it applies as soon as a rating exists.

The rating form

E-PIA_RATING-ALLOWED only applies if all three conditions are met.
  • The visitor is logged in to the shop.
  • They did not upload the image themselves.
  • They have not yet rated this image.
Without E-PIA_HiddenTags(rating) in the form, the rating fails. The tag sets the session key without which ProductsInAction rejects the submission with the message LimitExceeded.
E-PIA_IS-OWNER separates the two reasons why E-PIA_RATING-ALLOWED does not apply. Without this distinction, the submitter of their own photo would be told they had already rated it, which would understandably confuse them.
Ratings from 1 to 5 are permitted. A missing value or a value outside this range leads to the messages NoRating or RatingOutOfRange from the <ProductsInAction-Txt> section, and the rating is not saved.
The login check is handled by ST-LoggedIn, not by ProductsInAction. E-PIA_RATING-ALLOWED does not apply for a visitor who is not logged in either, but it cannot tell why. Only the ST-LoggedIn range allows you to show the login notice.
Reference: ST-LoggedIn

Errors and notices

E-PIA_ErrorMsg and E-PIA_InfoMsg apply in all three ProductsInAction templates and are range tags and single tags at the same time. The range ensures that the frame only appears if there really is something to report.

The tags at a glance

All tags on this page are permitted in the ProductsInAction detail view template. E-PIA_RatingScore(), E-PIA_RatingScoreImg() and E-PIA_RatingVotes also apply in the gallery template.
  • Guide: Offering ProductsInAction
  • Reference: ProductsInAction section
  • Reference: E-PIA_ (Image data)
  • Reference: E-PIA_ (Gallery)
  • Reference: E-PIA_ (Upload)