- Posts: 7
COMMUNITY FORUM
How do you move Extra Fields - Above Main Text?
- Starsalary
- Topic Author
- Offline
- New Member
Less
More
13 years 11 months ago #91800
by Starsalary
How do you move Extra Fields - Above Main Text? was created by Starsalary
Hi guys,
Pretty new to K2sorry if this is a basic question....
I'd like to move the Extra Fields (Additional Info) above the main text body
(just below the "Rate this Item" )
I'm assuming it's somewhere in K2.css ?!?
Thanks!
Pretty new to K2sorry if this is a basic question....
I'd like to move the Extra Fields (Additional Info) above the main text body
(just below the "Rate this Item" )
I'm assuming it's somewhere in K2.css ?!?
Thanks!
Please Log in or Create an account to join the conversation.
- william white
- Offline
- Platinum Member
Less
More
- Posts: 3722
13 years 11 months ago #91801
by william white
Replied by william white on topic How do you move Extra Fields - Above Main Text?
This is a good example of what you can to by creating an override
k2joom.com/k2-templates/profiler-k2-template/item-example
see here simon.getk2.org/k2-documents/item/91-templating for a guide
The extra fields will start with <!-- Item extra fields --> (one line above this text) in item.php and you will want to move the entire phpif block of code up in the file where you want it
k2joom.com/k2-templates/profiler-k2-template/item-example
see here simon.getk2.org/k2-documents/item/91-templating for a guide
The extra fields will start with <!-- Item extra fields --> (one line above this text) in item.php and you will want to move the entire phpif block of code up in the file where you want it
Please Log in or Create an account to join the conversation.
- Starsalary
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
13 years 11 months ago #91802
by Starsalary
Replied by Starsalary on topic How do you move Extra Fields - Above Main Text?
Awesome that worked.
Thanks a lot!
William White said:
This is a good example of what you can to by creating an override
k2joom.com/k2-templates/profiler-k2-template/item-example
see here simon.getk2.org/k2-documents/item/91-templating for a guide
The extra fields will start with <!-- Item extra fields --> (one line above this text) in item.php and you will want to move the entire phpif block of code up in the file where you want it
Thanks a lot!
William White said:
This is a good example of what you can to by creating an override
k2joom.com/k2-templates/profiler-k2-template/item-example
see here simon.getk2.org/k2-documents/item/91-templating for a guide
The extra fields will start with <!-- Item extra fields --> (one line above this text) in item.php and you will want to move the entire phpif block of code up in the file where you want it
Please Log in or Create an account to join the conversation.
- william white
- Offline
- Platinum Member
Less
More
- Posts: 3722
13 years 11 months ago #91803
by william white
Replied by william white on topic How do you move Extra Fields - Above Main Text?
welcome
Please Log in or Create an account to join the conversation.
- william white
- Offline
- Platinum Member
Less
More
- Posts: 3722
13 years 9 months ago #91804
by william white
Replied by william white on topic How do you move Extra Fields - Above Main Text?
If you are using the default item.php in k2 2.4.1 the gallery should already be below the extra fields.
If they are not check the template your using and see if it has already overridden k2 with its own default
If you have created an override be sure you went to the category and selected it
If it doesnt seem to work you should first verify that its working before trying to change it.
copy root/components/com_k2/templates/default
to root/templates/yourtemplate/html/com_k2/templates/default
make a copy of default and rename the entire folder to myoverride
edit myoverride/item.php and put some plain html text near the top
go to the category in k2 and select myoverride
point a new menu item to a k2 item in the same category
when you view the menu item you should see the html text you typed at the top and you will know its working
In item.php find the block of php code you want to move and copy it
Find the place in item.php where you want it to display and past the entire block of code there
When you look again you should have changed it...actually it should display twice....delete the block you dont want
the image gallery code is line 481 to 488 in item.php k2 ver 2.4.1
the extra fields code is line 254 to 568 in item.php
If you cannot get it to work pm me
If they are not check the template your using and see if it has already overridden k2 with its own default
If you have created an override be sure you went to the category and selected it
If it doesnt seem to work you should first verify that its working before trying to change it.
copy root/components/com_k2/templates/default
to root/templates/yourtemplate/html/com_k2/templates/default
make a copy of default and rename the entire folder to myoverride
edit myoverride/item.php and put some plain html text near the top
go to the category in k2 and select myoverride
point a new menu item to a k2 item in the same category
when you view the menu item you should see the html text you typed at the top and you will know its working
In item.php find the block of php code you want to move and copy it
Find the place in item.php where you want it to display and past the entire block of code there
When you look again you should have changed it...actually it should display twice....delete the block you dont want
the image gallery code is line 481 to 488 in item.php k2 ver 2.4.1
the extra fields code is line 254 to 568 in item.php
If you cannot get it to work pm me
Please Log in or Create an account to join the conversation.
- BBC
- Offline
- Platinum Member
Less
More
- Posts: 663
13 years 9 months ago #91805
by BBC
Replied by BBC on topic How do you move Extra Fields - Above Main Text?
K2 need urgently option to sort order of extra fields in Admin panel.
Not placement in template, it is impossible in Admin panel, but plain sorting. What field would show before in list of fields, that type of sorting.
Not placement in template, it is impossible in Admin panel, but plain sorting. What field would show before in list of fields, that type of sorting.
Please Log in or Create an account to join the conversation.
- Starsalary
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
13 years 1 month ago #91806
by Starsalary
Replied by Starsalary on topic How do you move Extra Fields - Above Main Text?
Hi Simon,
Moving the "additional fields" is no longer inline with the profile picture.
I recently changed my template and made the changes in the item.php. I moved the "additional fields" block higher up. while it did work, it no longer appears in line with the profile pic as it did with my previous template. I even copied the entire item.php file from the previous template to make sure no mistakes were made - results were the same.
you can see what I mean when viewing a profile....
starsalary.com/index.php?option=com_k2&view=item&id=479:tobey-maguire-net-worth-salary&Itemid=3
I even changed the template dimensions to make sure it wasn't an issue....
Template override?
Any help would be appreciated
Thanks
Moving the "additional fields" is no longer inline with the profile picture.
I recently changed my template and made the changes in the item.php. I moved the "additional fields" block higher up. while it did work, it no longer appears in line with the profile pic as it did with my previous template. I even copied the entire item.php file from the previous template to make sure no mistakes were made - results were the same.
you can see what I mean when viewing a profile....
starsalary.com/index.php?option=com_k2&view=item&id=479:tobey-maguire-net-worth-salary&Itemid=3
I even changed the template dimensions to make sure it wasn't an issue....
Template override?
Any help would be appreciated
Thanks
Please Log in or Create an account to join the conversation.
- ghog
- Offline
- New Member
Less
More
- Posts: 5
11 years 8 months ago #91807
by ghog
Replied by ghog on topic Re: How do you move Extra Fields - Above Main Text?
this link is dead now, is there another tutorial for this anywhere?
simon.getk2.org/k2-documents/item/91-templating
simon.getk2.org/k2-documents/item/91-templating
Please Log in or Create an account to join the conversation.
- william white
- Offline
- Platinum Member
Less
More
- Posts: 3722
11 years 8 months ago #91808
by william white
Replied by william white on topic Re: How do you move Extra Fields - Above Main Text?
getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates
find the entire block in item.php that displays the extra fields, and move it up in the file where you want it to display
Play around with the placement
Always use a template and BACKUP your site first
find the entire block in item.php that displays the extra fields, and move it up in the file where you want it to display
Play around with the placement
Always use a template and BACKUP your site first
Please Log in or Create an account to join the conversation.