Can't show [-- PAGE.Graphic REMOVE_html --] on a Moreinfo Pg

General ShopSite user discussion

Can't show [-- PAGE.Graphic REMOVE_html --] on a Moreinfo Pg

Postby JoeCuv » Fri Oct 06, 2006 2:22 pm

I have a Custom Page Template called "Custom-Page". It has these 2 variables in it:
[-- VAR.MoreInfoTemplate MoreInfoPage --]
[-- VAR.PageGraphic PAGE.Graphic --]

In Custom-Page I call on the Banner Graphic like this so I can apply the
class "pagelink" from my CSS: <img [-- PAGE.Graphic REMOVE_html --] class="pagelink">

My More Info include template is "MoreInfoPage". This More Info template
calls on the Banner Graphic as follows: [-- VAR.PageGraphic --]

I don't want all the HTML Image Attributes that come with this tag since I
want to apply the CSS class="pagelink" just like in Custom-Page. I tried
these 2 tags, but neither one works:
<img [-- PAGE.Graphic REMOVE_html --] class="pagelink"> (errors on publish)
<img [-- VAR.PageGraphic REMOVE_html --] class="pagelink"> (doesn't show image)

How do I get MoreInfoPage to give me the same result as the Custom-Page page template?
JoeCuv
 
Posts: 4
Joined: Fri Oct 06, 2006 11:12 am
Location: Solana Beach, CA

Postby Jim » Fri Oct 06, 2006 3:34 pm

A product moreinfo page will be generated only one time during any publish sequence. So if your product is assigned to multiple pages and you use the page graphic from the page the product is assigned to it could change from time to time depending on which page is being generated.

If the image needs to be the same all the time you might want to just hard code the image name into the template (or an include file) or you could use one of the custom product fields to specify the image that you want to use on the moreinfo page (if it isn't the product.moreinfographic)

I don't think that the remove html will work on a var that you have assigned an image tag to. If you are a programmer you could write CALL program to strip the necessary part of the url from the Var you assign the page.graphic to and then construct the url in the way you need it.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Are there any other options?

Postby JoeCuv » Fri Oct 06, 2006 7:50 pm

Thanks Jim. I was hoping that there is a different tag or syntax to get the results I want and I just didn't know about it.

Why I can't Hard Code the image:
I can't hard code the graphic because it will change depending upon what Category the product is in, this graphic will change. Also, I am not the end user that is deciding what graphic it is. My client is going to randomly pick and assign images each time they modify the Category Page. It could change as often as 5 or 6 times a year.

Why I can't use a custom Product Field for now:
I can't use the custom Product Fields right now because I have to reserve at least 4 of them for other uses. Plus I am trying to make the data entry for the end user as user friendly as possible. If they have to start typing in the file names into Custom Fields they are going to mistype them, screw it up and ask stupid questions.

On a whim I tried your syntax for PRODUCT.MoreInfoGraphic
If I try to use: [-- product.moreinfographic --]
I get this error: <!-- Illegal field [moreinfographic] -->

So I am back to where I started. I am on a More Info page and I want to call on an image file name without the HTML. I suppose I could write Javascript to extract the file name, but that seems like a fat task for a simple request. I don't understand, why can I do this on a PAGE but I can't do it on a MOREINFO page/include?

Any other ideas?
JoeCuv
 
Posts: 4
Joined: Fri Oct 06, 2006 11:12 am
Location: Solana Beach, CA

Postby Jim » Fri Oct 06, 2006 8:32 pm

Sorry, the tag for the more information graphic is
[-- PRODUCT.MoreInformationGraphic --] not as I previously stated. The remove_html option will work with that image too. So you could have
[-- PRODUCT.MoreInformationGraphic remove_html--]

Depending on the version of ShopSite you are using there is also the tag
[-- image product.moreinformationgraphic --] which will give you just the image name.

I could not find a way to pass anything but the complete page graphic url using a VAR. Options such as remove_html and Image VAR.graphic don't work with Var only with actual image tags like page.graphic. You also can't use either of these options when assigning to a VAR.

I don't see any other way to pass an image unless it is in one of the special product fields or the actual moreinfo page image.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

I surrender!

Postby JoeCuv » Sat Oct 07, 2006 3:23 pm

Thanks Jim. I have come to accept that I cannot call on a PAGE tag in a PRODUCT More Info template.

For now, I will use a work around since I have bigger fish to fry. In version 8 I can use the Cart Administration page for managing Images. From the Images manager, I can select the image file from the list, click on Change Attributes and add the class=pagelink into the IMG SRC tag. Then every time I call the image, I will get the proper CSS styles. The only downside is that every time I use this image it will always carry those CSS styles.

When I have time to get fancy I will write some Javascript to parse the VAR and rebuild the value with the class=pagelink in the template istead of carring the change in the database.
JoeCuv
 
Posts: 4
Joined: Fri Oct 06, 2006 11:12 am
Location: Solana Beach, CA

Postby websitewerx » Sun Oct 08, 2006 4:42 pm

If you're using the image on different pages, you could include CSS with the various templates that overrides the styles already set by class=pagelink.
websitewerx
 
Posts: 11
Joined: Tue Aug 29, 2006 10:10 am
Location: Denver, CO


Return to User Forum

Who is online

Users browsing this forum: No registered users and 69 guests