X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Linking pages from product pages (https://forum.x-cart.com/showthread.php?t=46598)

Tim CDN 03-27-2009 06:25 PM

Linking pages from product pages
 
Hi all

When you are editing the product description and are using html to design it, is there an alternative to link to another page other than a static link?

This is what I am using
<a href="http://www.testsite.com/xcart/testpage.html">

I would like to use a dynamic link like:
<a href="testpage.html">
Because when I change my cart the the root directory all the links I have made will have to be redone.

Is that possible? What code do I have to use to enable these links?

Or should I keep the static link for SEO purposes?

Wow - So much to learn!

JWait 03-28-2009 06:15 AM

Re: Linking pages from product pages
 
I don't understand why you would create a product page in html, x-cart creates product pages dynamically using templates.

Tim CDN 03-28-2009 06:36 AM

Re: Linking pages from product pages
 
I am using html to design the layout of the product description - not the actual product page. Sorry, I wasn't very clear about that.

I want to link to static pages without having to input a static link.

gb2world 03-28-2009 10:55 AM

Re: Linking pages from product pages
 
I also am not clear on what you are trying to do and why
<a href="testpage.html">
would not work if testpage is a static page or rewritten URL created within xcart.

I don't use 4.2, but on 4.1.x, you can use a smarty variable that indicates your cart location:
<a href="{$current_location}/testpage.html">
This works in XCART - so if you are making html pages outside xcart, there is more involved in using the smarty variables.

Tim CDN 03-28-2009 02:44 PM

Re: Linking pages from product pages
 
Two issues
#1
What I am trying to do is link a to a page from either text or an image.

To link a page I am trying to use:
<a href="testpage.html">
this works with static pages - I think I have sorted this prob out.

#2

When I try to show an image into the product description I would like to use smarty but I am having problems

If I use:
<img src="{$ImagesDir}/test.gif" alt="" />

in the HTML of the product description it won't pull the image.

But if I use this:

<img src="http://www.testsite/images/test.gif" alt="" />

It works

Thanks for the help

JWait 03-29-2009 04:28 AM

Re: Linking pages from product pages
 
In admin - general settings is the field "Parse Smarty tags in the content of embedded static pages" checked?

carpeperdiem 03-29-2009 04:55 AM

Re: Linking pages from product pages
 
Quote:

Originally Posted by Tim CDN
If I use:
<img src="{$ImagesDir}/test.gif" alt="" />

in the HTML of the product description it won't pull the image.

But if I use this:

<img src="http://www.testsite/images/test.gif" alt="" />

It works


Your images must live in /skin1/images

/skin1/images = {$ImagesDir}

DO NOT use /images unless you want to break your site when it goes https.


All times are GMT -8. The time now is 09:45 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.