[REGLE] Champ weblink : url erronée

More
11 years 7 months ago #35945 by houba_houbi
Hello

Merci, ah mais je ne savais pas qu'on pouvait afficher qu'un seul champs. J'utilise dans mon template le code :
Code:
<?php if (isset($this->item->positions['BDD'])) : ?><div class="item_bdd"><?php foreach ($this->item->positions['BDD'] as $field) : ?><span class="element"><?php if ($field->label) : ?><span class="label label_field_<?php echo $field->name; ?>"><?php echo $field->label; ?></span> : <?php endif; ?><span class="value value_field_<?php echo $field->name; ?>"><?php echo $field->display; ?></span></span><br /><?php endforeach; ?></div><?php endif; ?>

Là ça ne marche pas :
Code:
Notice: Trying to get property of non-object in xxx\components\com_flexicontent\templates\installationsclients\item.php on line 65
Mais je n'ai pas de position "render only", je ne vois pas ce que c'est ?

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

More
11 years 7 months ago #35946 by houba_houbi
ça marche avec ce code plutôt :
Code:
[url=<?php echo $this->fields['myfield']->display; ?>" target="_blank]<?php echo $this->fields['myfield']->display; ?>[/url]

Merci

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

More
11 years 7 months ago #35948 by ggppdk
Yes i was going to suggest that (i mean using the text field), just wanted to suggest something

Text Input field has:
input validation mask
including input validation mask for URL

-- Test the mask and if you are satisfied with it, then use it , i imagine developer of inputmask or us will improve it in a future release


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
11 years 7 months ago #35955 by houba_houbi
Hello

I am not sure to understand what you mean.

So I resolved my problem by changing my field type from weblink to text.
And with the code above that works.

Just one thing if the text field is empty, this code display always my label. How to use an "isset" condition for an individual field?

Thanks

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

More
11 years 7 months ago #35957 by ggppdk
Hello,
try this:
Code:
<?php if ( $this->fields['myfield']->display ) : ?> [url=<?php echo $this->fields['myfield']->display; ?>" target="_blank]<?php echo $this->fields['myfield']->display; ?>[/url] <?php endif; ?>


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
11 years 7 months ago #35959 by houba_houbi
Hello
Wonderfull !! It Works.
Thanks a lot for your help.

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.804 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