Keyword

Advanced Search

Search Results (Searched for: extra field order)

  • David Gough
  • David Gough's Avatar
29 Jan 2014 04:51

Extra Field: select from Drop Down list of items

Category: English K2 Community

Hi

I'm relatively new to K2 and am finding my way around.

I need to create an Extra Field which presents ALL the item titles from a specific category in a Drop Down list.

I have a K2 category called "bands" which contains biographies of some 400 bands - each as an item.
In order for me to display who is performing at each "event" I need to be able to select from the list of bands and have that selection displayed as a link on the event page that points directly to the biography.

Can anyone suggest a way to do this?

Many thanks, David
  • Tim Payne
  • Tim Payne's Avatar
28 Jan 2014 22:49
How to shift content on a page please was created by Tim Payne

How to shift content on a page please

Category: English K2 Community

Working on a site for a filmmaker friend.
Have a category created in Catalog view that shows an image of each completed project.
When that image is clicked visitors see the content of the Extra Fields, with the media content below it.

www.amandatrudellpro.com
Click Projects menu item
Click the featured item for an example

What we want is the embedded video to be at the top of the page and the Extra Field text directly beneath the video. This way the visitor does not have to scroll down in order to watch the video.

Thank you!
  • Michael Groen
  • Michael Groen's Avatar
26 Jan 2014 14:44
portvolio anpassen was created by Michael Groen

portvolio anpassen

Category: Offizielle deutsche Gemeinschaft

Hallo,

der zeit wird auf meiner webseite das portfolio so angezeigt das wen man auf das Bild klickt, kommt ein Popup bzw. das bild wird dann angezeigt. Das möchte ich habe nicht.

ich möchte das wen man auf das bild klick man zu einen Beitrag kommt.

Mann könte jetzt auch einfach ein andere forlgae nehmen aber ich möchte gerne das;

#port #portfoliosorting .sortbytype {
float: right;
padding: 0;
}

oben bestehn bleibt.

wo stelle ich den nun ein, das die bilder nicht als gallery bilder aufgehn sondern zu den dazughörigen beitrag gelangt?

oder die bessere wariante währe in der Layoutvorlage portfoliosorting zu integrieren.

portfoliosorting = All Concert Feierlichkeiten Hochzeit Shooting

das sind schlagwürder und wen man drauf kligt stelt sich die gallery um.

der code fürs portfolio layout;
your-set.com/index.php/bilder-galerie.html

lg
Michael
  • Yiota
  • Yiota's Avatar
16 Jan 2014 12:34

SOLVED: How to access extra fields in tag template

Category: English K2 Community

Hello,

You cannot just have <?php echo $extraField->value; ?> You need to define the extrafield itself in order to bring the value.

Try with this code
<?php if($item->params->get('tagItemExtraFields',0) && count($item->extra_fields)): ?> <?php echo $item->extraFields->Price->value; ?> <?php endif; ?>
  • Odin Mayland
  • Odin Mayland's Avatar
06 Jan 2014 21:35 - 06 Jan 2014 22:51
Replied by Odin Mayland on topic Why make muliple extra field groups?

Why make muliple extra field groups?

Category: English K2 Community

My subscription to this thread must not be working, because I did not get your reply.

In the mean time I had email you this question. But it appear you have already answered it.

If I have the same titled extra field in multiple EF groups and then use MEFG to assign multiple groups to a catgeory, will the duplicate EFs show in the K2 Item Extra Field tab?

For example, will the EF: "Tires" only show once since it is a duplicate?
EF Group: Cars
--- EF: Tires

EF Group: Motorcycles
--- EF: Tires

K2 Category: Vehicles
--- EF Groups: Cars and Motorcycles
EF: Tires

And, how is the ordering of EFs on the item page controlled when I choose multiple EF groups for a k2 cat?
  • ljk
  • ljk's Avatar
14 Dec 2013 02:21 - 21 Jan 2014 18:08

SOLVED: How to access extra fields in tag template

Category: English K2 Community

Hi,

I have been using K2 on a Joomla 1.5 site and now am upgrading to Joomla 3.x. When I needed to access the extra field values in one of the template pages I had a foreach loop that walked thru the extra fields until I found the one I needed and got its value. This worked from categories, items, and tag templates. Now with the new Joomla 3 version of K2 the categories and items templates have the same structure as they did in Joomla 1.5 and I can get the values that I need. But for some reason the tag structure is totally different for the extra fields.

For categories and items the extra fields structure looks like this:
Array
(
[0] => stdClass Object
(
[id] => 1
[name] => Street Address
[value] => 602-1888 York Avenue
[type] => textfield
[group] => 2
[published] => 1
[ordering] => 1
[alias] => StreetAddress
)

[1] => stdClass Object
(
[id] => 2
[name] => Price
[value] => 389000
[type] => textfield
[group] => 2
[published] => 1
[ordering] => 4
[alias] => Price
) ...

But on the tags page the structure looks like this:
[{"id":"1","value":"602-1888 York Avenue"},{"id":"2","value":"389000"},...

I need to get the 'Price' from the extra fields which is: 389000. So id 2's value. How to I code this so I can get out the value of id 2?

I tried:
[code
]foreach ($fields as $key=>$extraField):
if ($extraField->id == '2') {
$price = $extraField->value;
endforeach;
[/code]

But that isn't working, it gets an error:
Warning: Invalid argument supplied for foreach()

Any help would be appreciated.

Thank you.
  • Yiota
  • Yiota's Avatar
12 Dec 2013 12:31
Replied by Yiota on topic Link K2 item or article to an external url

Link K2 item or article to an external url

Category: English K2 Community

You can achieve that by using an extrafield. The extra field will hold the external URL and it will replace the actual url of the item in your lists.
You will have to create a K2 template override in order to modify the category_item.php file. Read here getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates on how K2 overrides work if your template doesn't use them already.
  • K Coyne
  • K Coyne's Avatar
10 Dec 2013 01:17
Replied by K Coyne on topic Extra field values - ordering

Extra field values - ordering

Category: English K2 Community

I also very much need this capability to re/order values for extra values as lists grow/change. The lack of this capability is an EXTREME limitation on extra fields.
  • programador.5
  • programador.5's Avatar
09 Dec 2013 20:08
Edit extra fields in backend item form was created by programador.5

Edit extra fields in backend item form

Category: English K2 Community

Hello!

I'm currently trying to edit the backend item form (administrator/components/com_k2/views/item/tmp/default.php) in order to add a javascript call to a specific extra field, the code I'm using is as follows, in line 561 of the deafult.php file:
if($extraField->type == 'select'){ //Add jquery onchange function after <select string $needle="K2ExtraField_1"; if (strpos ( $extraField->element , $needle )){ $string=$extraField->element; $substr = '<select'; $attachment = ' onchange="checkseleccion()"'; $extraField->element = str_replace($substr, $substr.$attachment, $string); } }

The code should add "onchange="checkseleccion()" " to an extra field with the id K2ExtraField_1, however it isn't working in the backend. In the front end submission form it works perfectly.

Is this the file I should be editing, or there's some other place where I can access the extra field code to add the function?

Thanks in advance!

Joomla: 3.1.5
K2: 2.6.7
  • BARBARA GERANAKI
  • BARBARA GERANAKI's Avatar
06 Dec 2013 13:23
Replied by BARBARA GERANAKI on topic Changing K2 pluging order.

Changing K2 pluging order.

Category: Commercial Joomla Templates

I tried the fisrt part by copying your code to the right file and it's perfect! All the plugins are in the order I wanted them to be.

But I dont understand exactly the second part with the custom.css.
I copied the code in the file. Have a look if I'm doing something wrong.

/**
* @version 1.0.1
* @package nuMovies
* @author Nuevvo - nuevvo.com
* @copyright Copyright (c) 2010 - 2013 Nuevvo Webware Ltd. All rights reserved.
* @license nuevvo.com/license
*/

/* Add custom CSS code here for easier template updates */

.itemBody .itemContentLeft {margin:0 20px 20px 20px;}



What is the purpose of that change? I was expecting to fix the margins around the extra fields block, but the way I did nothing changed.
  • BARBARA GERANAKI
  • BARBARA GERANAKI's Avatar
05 Dec 2013 23:25
Changing K2 pluging order. was created by BARBARA GERANAKI

Changing K2 pluging order.

Category: Commercial Joomla Templates

I would like to ask you if it is possible for someone like me (with not much of css knowlegde) to change the order of the K2 features after the articles?
I could really use 3 basic changes.
1) I would like to have my text in the articles wrapping under the extra fields block because now the text length its getting very short.

2) Is it possible to get the video block after the text and before the "author", "latest from" and "related articles"?

3) and the last one...can I move the "social icon" and the "rating" line before the image and text and after the anchor icons?
  • Yiota
  • Yiota's Avatar
21 Nov 2013 18:01
Replied by Yiota on topic How i can showcase K2 extensions

How i can showcase K2 extensions

Category: English K2 Community

Every submission to getk2.org gets approved before it gets published.
Make sure that your entry is not incomplete and we cannot yet publish it until some additional information is provided.

Please login again to getk2.org, click on your "user page" (see the top user toolbar) and in your user page you will see any unpublished entry of yours. Please edit each unpublished entry for extensions or templates, making sure you fill in all the required details for listing.

This includes:
- at least a logo or screenshot for your extension or template. Uploaded images are automatically resized.
- additional information located in the "Extra Fields" tab (in the entry form), like type of extension (e.g. module, template etc.), version number, price (free, commercial) and of course links to the product's page. The more details you fill in, the better.
- if you are listing a free product, you can optionally upload it via the "Attachments" tab. If you don't want to do that, please make sure you add a download link in the "Extra Fields" tab.
- finally, make sure you have selected the appropriate category for your listing.

Additionally:
- you can add a video showcasing your product
- add an image gallery including more screenshots of your product.

We hope you'll proceed with all necessary changes in order for your listing to be approved.

Thank you.
  • Odin Mayland
  • Odin Mayland's Avatar
20 Nov 2013 23:39
Replied by Odin Mayland on topic How to display extra fields in K2 component

How to display extra fields in K2 component

Category: English K2 Community

Is it possible to use similar code in the K2 item description to display an extrafield value?

<?php echo $this->item->extraFields->alias->value ;?>

When I try using nonumber.nl Sourcerer in order to put PHP code in the K2 Item I get this error:

Fatal error: Using $this when not in object context in /home/goodwin/public_html/xjoomla/plugins/system/sourcerer/helper.php(552) : runtime-created function on line 7

Nonumbers support states that it didn't work because, "That's because $this->item-> is not known. Sourcerer doesn't magically create that variable for you. "

Please help me display extrafields using JCE in a K2 item description.
  • Yiota
  • Yiota's Avatar
18 Nov 2013 13:10

How to display extra fields in K2 component

Category: English K2 Community

First of all you will have to create K2 template overrides. Read here on how overrides work getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates

Then you will have to modify the item.php file in order for this particular extra field to show next to the image.
After you have located the itemImage block of code you can target the specific extra field through these lines of code:
<?php echo $this->item->extraFields->THE EXTRA FIELD ALIAS->label; ?> <?php echo $this->item->extraFields->THE EXTRA FIELD ALIAS->value; ?>

You will probably want to place them in a <div class="YOUR_CLASS"> container in order to style them afterwards and place them next to your image.
  • Krikor Boghossian
  • Krikor Boghossian's Avatar
31 Oct 2013 13:06
Replied by Krikor Boghossian on topic Display specific extra field in module position ?

Display specific extra field in module position ?

Category: English K2 Community

K2 Tools is not intended to display item lists. You need to use K2 Content istead in order use this snippet.
  • SocheatICT
  • SocheatICT's Avatar
25 Oct 2013 18:44 - 25 Oct 2013 18:45
Replied by SocheatICT on topic How to get echo extra field values by number?

How to get echo extra field values by number?

Category: English K2 Community

Hi Krikor Boghossian

Thanks so much for your time with support me, I click on your link and try it, but it's still ExtraFiled value as (label) instead of number ordering value as I need.

As i saw in database: written as , Example, "value":1, "value":2,....

below as in DB

{"name":"One","value":1,"target":null,"alias":"test","required":1,"showNull":0},{"name":"Two","value":2,"target":null,"alias":"test","required":1,"showNull":0},{"name":"Three","value":3,"target":null,"alias":"test","required":1,"showNull":0}

I really need value in number as I highlighted in red color:

So what i need get value from as ordering number as 1 or 2 or 3, because need to make dynamic link for search function.

Thanks

Best Regards
  • conegross
  • conegross's Avatar
22 Oct 2013 16:21
Replied by conegross on topic Item desde un formulario

Item desde un formulario

Category: Comunidad hispana oficial de K2

Yo creo que si desde el formulario logro sustraer toda la informacion podria generar una consulta similar a la que pego al final para insertar y crear el item.

La pregunta es que pasa si tengo galerias de fotos, videos, contenido media?


INSERT INTO `iy8uw_k2_items`(`id`, `title`, `alias`, `catid`, `published`, `introtext`, `fulltext`, `video`, `gallery`, `extra_fields`, `extra_fields_search`, `created`, `created_by`, `created_by_alias`, `checked_out`, `checked_out_time`, `modified`, `modified_by`, `publish_up`, `publish_down`, `trash`, `access`, `ordering`, `featured`, `featured_ordering`, `image_caption`, `image_credits`, `video_caption`, `video_credits`, `hits`, `params`, `metadesc`, `metadata`, `metakey`, `plugins`, `language`) VALUES ([value-1],[value-2],[value-3],[value-4],[value-5],[value-6],[value-7],[value-8],[value-9],[value-10],[value-11],[value-12],[value-13],[value-14],[value-15],[value-16],[value-17],[value-18],[value-19],[value-20],[value-21],[value-22],[value-23],[value-24],[value-25],[value-26],[value-27],[value-28],[value-29],[value-30],[value-31],[value-32],[value-33],[value-34],[value-35],[value-36])
  • Yiota
  • Yiota's Avatar
11 Oct 2013 11:17
Replied by Yiota on topic Question regarding styling (Nokkori-Hotel)

Question regarding styling (Nokkori-Hotel)

Category: Commercial Joomla Templates

Since I am at a little loss of what it is that you actually want to achieve with your extrafields would you be kind enough to revise it for me in order to get it right and sent you the file back as you want?

Thank you.
  • Yiota
  • Yiota's Avatar
08 Oct 2013 17:11
Replied by Yiota on topic Question regarding styling (Nokkori-Hotel)

Question regarding styling (Nokkori-Hotel)

Category: Commercial Joomla Templates

You will have to add the following CSS in the custom.css file located in templates/nokkori/css/
.itemExtraFields ul {padding:10px 0;} .itemExtraFields ul li { border-bottom: 1px dotted ADD YOUR BORDER COLOR; display: block; margin: 0; padding: 4px 0; } .itemExtraFields ul li.even { ADD HERE YOUR BACKGROUND COLOR } .itemExtraFields ul li.odd {} .itemExtraFields span.itemExtraFieldsLabel { display: block; float: left; font-weight: bold; min-width: 100px; }
  • bartek mazur
  • bartek mazur's Avatar
25 Sep 2013 20:27
Extra fields parent=>child was created by bartek mazur

Extra fields parent=>child

Category: English K2 Community

Hello,

is there a possibility to create a hierarchy of extra fields? I recently bought k2 search module, which uses such a thing in order to set up 'connected fields' search, but I somehow cannot find out how to do it...
Displaying 221 - 240 out of 529 results.

Powered by Kunena Forum