[ADDED] _target attribute for extended weblink per value

More
8 years 3 months ago - 8 years 3 months ago #64000 by othbert
Hi there,

I need a field, either weblink or extendedweblink I guess, that will allow the content creators to decide whether a link they create should have a target="_blank" set on it.

I see there is the ability to change that for both of these field types, but unless I'm missing something, it looks like it can only be set for that field globally? The authors will and should not have access to the fields and types definition, simply to enter and edit content items. I could create two link fields, one linking as normal and the other that opens a new window, but that's quite a pain.

Have I just totally missed something perhaps? Otherwise I will clone the weblink field and try to create the target as part of the field parameters.

Thanks!
Last edit: 8 years 3 months ago by ggppdk.

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

More
8 years 3 months ago - 8 years 3 months ago #64025 by othbert
Seems like, in 3.0.14-rc2a at least, the target is hardcoded in the com_flexicontent/controller.php around line 2868
So the option to recreate the field can only be done with either no hit tracking, or hacking the core (which I'd naturally rather not do).

The issue is that I'd like to use a single field, which can have multiple values, some of them linking with a blank target, others opening in place. To have two separate fields means the authors cannot mix the order of them together, only to create multiples of one or the other. For clarification, say link A is no target type, link B is blank target type. Setting up with two fields means they can only create lists of links like AAAABB or BBBBAA, but not AABBBAAABABA etc

Is there the possibility this could be implemented for a future release and an update to the weblink / extendedweblink field plugins?

Thanks!
Last edit: 8 years 3 months ago by ggppdk.

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

More
8 years 3 months ago - 8 years 3 months ago #64040 by ggppdk
Hello

Seems like, in 3.0.14-rc2a at least, the target is hardcoded in the com_flexicontent/controller.php around line 2868
So the option to recreate the field can only be done with either no hit tracking, or hacking the core (which I'd naturally rather not do).


No, it is not hardcoded, the selection of the TARGET window,
- has already happend before you reach the controller task,

So the controller task correctly always force the current window to be used
e.g.
open new window - then controller 'weblink' task use the current = the new window that was opened
same window - then controller 'weblink' task use the current = the existing window
parent framset - then controller 'weblink' task use the current = the parent framset
etc


Now about your question making target selectable in item form
yes, i have thought before that this is more useful than e.g. selecting an ID

and to modify the extended-weblink to allow selecting the target of the link -per value- is straight forward


-- 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...
Last edit: 8 years 3 months ago by ggppdk.
The following user(s) said Thank You: othbert

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

More
8 years 3 months ago - 8 years 3 months ago #64042 by ggppdk
Hello

please read my previous answer,

1. Click to download and install via Joomla extension manager in test site latest github version
github.com/FLEXIcontent/flexicontent-cck/tree/3.1.x-stable

2. Enable in field configuration of extended weblink the option to make target selectable (editable) in item form,

3. then in item form add some links and set target,
save and view the item , and test the links by clicking them

NOTE: 'default' will use the configured 'default' target , that was configured in the viewing TAB


-- 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...
Last edit: 8 years 3 months ago by ggppdk.
The following user(s) said Thank You: othbert

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

More
8 years 3 months ago - 8 years 3 months ago #64051 by othbert
Ahh that's fantastic :)
Thanks for the clarification and the quick response! I'm just trying to get this finished up to present to the client for a first version. I'll try to get this modification in asap and upgrade to the latest version of FLEXI while I'm at it...

Thanks again!
Last edit: 8 years 3 months ago by ggppdk.

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

More
8 years 3 months ago - 8 years 3 months ago #64058 by othbert
Have tested it a little and looks great so far :D
I'll keep at it and see how it goes...
Last edit: 8 years 3 months ago by ggppdk.

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

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