17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 800 Views |
-
creating a hrdcoded image link with a feild

8 July 2008 at 1:58am
I have two advert images on a website homepage which are displayed by two image uploaders and I have also created two text feilds where I want to put an external website address. Is it possible, within the homepage.ss to use the textfeilds to link the image? Here is what i have:
<a href="http://$Left_Advert_Website">$Left_Advert</a>
$Left_Advert_Website is the text feild for the site
$Left_Advert is the imageHowever when i hover over the image it displays" http:/// and on clicking I get the message: "The URL is not valid and cannot be loaded"
Am i trying to do the impossible or is there anyway of resolving this issue - ideally i do not want to hard code the URL
-
Re: creating a hrdcoded image link with a feild

8 July 2008 at 12:40pm Last edited: 8 July 2008 12:42pm
Yep it is certainly possible to do - $Left_Advert_Website probably hasnt been correctly saved. What you might have to do is wrap the variable in a {} to prevent it being interpreted as $Left_Advert_Website".. so you would have <a href="http://{$Left_Advert_Website}">. But first off you need to make sure Left_Advert_Website exists
-
Re: creating a hrdcoded image link with a feild

8 July 2008 at 8:48pm
OK im a noob!
When creating the fields I first build the imagefeilds so that I could work on the visuals and get the page styling right. When it came to creating the textfeilds my natural instinct put them with the imagefeilds in the static $has_one = array rather than static $db = array. Whoops!Thanks for your help willr
| 800 Views | ||
|
Page:
1
|
Go to Top |


