Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Is it possible to use php coded links in category descriptions?

Is it possible to use php coded links in category descriptions?

Locked

Views: 1,355

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
31 Aug 2007, 9:32 PM
#1
timps avatar

timps

New Zenner

Join Date:
Apr 2005
Posts:
54
Plugin Contributions:
0

Is it possible to use php coded links in category descriptions?

Instead of links like this:

<a href="http://fabricland.com/zencart/index.php?main_page=index&cPath=86_89">Adults</a>
```I'd like to use something like this:

<a href="<?php echo ($_SERVER[''] . 'index.php?main_page=index&cPath=86_89');?>">Adults</a>

1 Sep 2007, 12:16 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Is it possible to use php coded links in category descriptions?

Why use absolute links at all ?

Just use relative links instead:

<a href="index.php?main_page=blahblah">etc....</a>

This way it's server-independent.

1 Sep 2007, 12:50 AM
#3
timps avatar

timps

New Zenner

Join Date:
Apr 2005
Posts:
54
Plugin Contributions:
0

Re: Is it possible to use php coded links in category descriptions?

DrByte:

Why use absolute links at all ?

Just use relative links instead:

<a href="index.php?main_page=blahblah">etc....</a>


Yes that would be much better.  Duh! :cry:  Now I get to chuckle at myself.  My only excuse is that in my rush to get online by Sept. 1st, I just pasted the links from the sideboxes and realizing that they were absolute I changed them with the $_SERVER[''] bit.  I have to keep reminding myself....K.I.S.S.

Thanks for straightening me out Doc.
1 Sep 2007, 12:52 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Is it possible to use php coded links in category descriptions?

Simple's almost always better.