Templating

More
14 years 3 months ago #1786 by 24x4
Templating was created by 24x4
How would I access an added fields value?

For example, I have created the field of sponsor_id as a text box.

I now wish to display it in the template as a link.
How would I accomplish something like this?
Code:
$spo_id = $this->params->get('sponsor_id');

so that I could dynamically create the link.
Code:
<a href = "google.com?search=<? $spo_id ?>">google it

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #1942 by 24x4
Replied by 24x4 on topic Templating
Anyone have any ideas on this?

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #1948 by Doywan
Replied by Doywan on topic Templating
Asuming your using this in Flexicontent, here one way to do it :
Code:
[url=BeginingUrl<?php echo ($items[$i]->fields['sponsor_id']->value) : ?>EnOfUrl][/url]

Or create an url field with prefix = part of url above your text- field value - suffix = part after.

Dev et rédacteur en chef Fonky les bons tuyaux
www.fonkyt.com - magasine online de l'événementiel culturel et loisirs d'Orléans et son agglO

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.814 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline