[REGLE] Champ weblink : url erronée

More
12 years 9 months ago - 12 years 9 months ago #35930 by houba_houbi
Bonjour

J'utilise flexicontent en local en guide de base de données interne, j'ai créé un champ weblink afin de pouvoir y ajouter une url.

Lorsque je mets par exemple : www.monurl
Le ahref mis par défaut est erroné, je n'ai pas href=" www.monurl " mais href="/xxx/index.php?option=com_flexicontent&fid=22&cid=44&ord=1&task=weblink&Itemid=2"

Ce qui fait que lorsque je transforme mon document en pdf et que je l'envoie à des clients, le pdf utilise cette dernière url, mes clients qui n'ont donc pas accès au site localhost ne peuvent donc pas consulter l'url.
Comment faire pour que flexicontent indique la vraie url ?

Merci d'avance
Last edit: 12 years 9 months ago by houba_houbi.

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

More
12 years 9 months ago #35931 by ggppdk
Hello,
does it not display, the URL that you typed during editing the content,

a different URL is display than the one you entered?


-- 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 review. Thanks!

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

More
12 years 9 months ago #35934 by houba_houbi
Hello

So visually I have :
Code:
Url Site : https://monurl.com/

But in the html code, I have :
Code:
Url Site</span> : <span class="value value_field_UrlSite">[url=/xxx/index.php?option=com_flexicontent&amp;fid=22&amp;cid=50&amp;ord=1&amp;task=weblink&amp;Itemid=2]https://monurl.com/[/url]

As you see the href is not good and can't be used to generate pdf files.

Thanks for your help.

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

More
12 years 9 months ago #35939 by ggppdk
Hello,
the weblink field will always add links like this because:

1. To be able to count hits
2. To allow other future checks and features e.g. Access Level etc
3. To be able to (optional) hide the link by displaying only the title


-- 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 review. Thanks!

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

More
12 years 9 months ago #35942 by houba_houbi
hello,

OK I understand.

So is there a way to do the same with a simply text field ?
Because I try adding <a href" before the value and so on.
But I need to fill 2 values and I don't know to do that:
Code:
<a href"myvalue" target"_blank">myvalue

Thanks

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

More
12 years 9 months ago #35944 by micker
hello
tu peus faire cela par la customisation de ton template
Code:
<?php echo $this->fields->nom_du_champ->display; ?>
exemple
Code:
<a href"<?php echo $this->fields->nom_du_champ->display; ?>" target"_blank"><?php echo $this->fields->nom_du_champ->display; ?>
directement dans le code
attention glisse ton champ dans la position render only de ton template
a+

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

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

More
12 years 9 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
12 years 9 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
12 years 9 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 review. Thanks!

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

More
12 years 9 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.

Moderators: vistamediajoomlacornerggppdk
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
Save