- Posts: 37
COMMUNITY FORUM
Move title next to image?
- johnselekta
-
Topic Author
- Offline
- Junior Member
Please Log in or Create an account to join the conversation.
- william white
-
- Offline
- Platinum Member
- Posts: 3722
When you are wanting to customize the look consider k2 templating
search for templating on simon.getk2.org
and also
onecss4k2 at www.jiliko.net/en/Resources/Extensions/K2/Plugin-K2-Oneccsperk2template
Take a look at the example item and category views at K2Joom.com and you will see some of the possibilities
Please Log in or Create an account to join the conversation.
- johnselekta
-
Topic Author
- Offline
- Junior Member
- Posts: 37
I decided to hack into it myself and work it out after copying the template to templates/my-template/html/com_k2/default
My view was a category blog type thing, so I edited category_item.php and this sorted it.
Quite simply I moved the 'if' statement for the header (if to endif with all nested tags). I pasted it after the image DIV and it nested in there just perfect.
Thanks William.
Please Log in or Create an account to join the conversation.
- Shawn Marshall
-
- Offline
- New Member
- Posts: 8
Thanks
Please Log in or Create an account to join the conversation.
- Shawn Marshall
-
- Offline
- New Member
- Posts: 8
Please Log in or Create an account to join the conversation.
- johnselekta
-
Topic Author
- Offline
- Junior Member
- Posts: 37
So, as my vague solution says copy all files from (components/com_k2/templates/ - 4 files & the entire 'default' folder) to a new folder named 'com_k2' in your template's 'html' folder (mine is in templates/ja_purity_ii/html/).
Next, find the block of code (basically the inner code from the DIV called 'catItemHeader') and rearrange as follows (always back up first!):
item->link; ?>">
item->author->link; ?>">
That should get you just needing to tweak CSS just a bit to your taste.
Hope it helps you out ;-)
JohnLarry Marshall said:Thanks for the answer but img is listed many times in k2.css so I wouldn't know where to start. I was interested in his changes to category_item.php. I'm only really trying to make the frontend look like alphacontent.
Please Log in or Create an account to join the conversation.
- johnselekta
-
Topic Author
- Offline
- Junior Member
- Posts: 37
so you can align the div left ;)
in your css use
div.itemImageBlock {
float:left;
}
Larry Marshall said:Thanks for the answer but img is listed many times in k2.css so I wouldn't know where to start. I was interested in his changes to category_item.php. I'm only really trying to make the frontend look like alphacontent.
Please Log in or Create an account to join the conversation.
- johnselekta
-
Topic Author
- Offline
- Junior Member
- Posts: 37
So, as my vague solution says copy all files from (components/com_k2/templates/ - 4 files & the entire 'default' folder) to a new folder named 'com_k2' in your template's 'html' folder (mine is in templates/ja_purity_ii/html/).
Next, find the block of code (basically the inner code from the DIV called 'catItemHeader') and rearrange as follows (always back up first!):
item->link; ?>">
item->author->link; ?>">
That should get you just needing to tweak CSS just a bit to your taste.
Hope it helps you out ;-)
John
Please Log in or Create an account to join the conversation.
- johnselekta
-
Topic Author
- Offline
- Junior Member
- Posts: 37
Please Log in or Create an account to join the conversation.
- Shawn Marshall
-
- Offline
- New Member
- Posts: 8
Please Log in or Create an account to join the conversation.
- johnselekta
-
Topic Author
- Offline
- Junior Member
- Posts: 37
I've zipped my entire com_k2 folder for you (the override one). If you drop this into the html folder of your template (unzipped first) it should achieve what you're after.
One word of warning though I'm on 2.2 I think, not updated yet - so if you would rather just take the 1 php file thats been tweaked (category_item.php), just replicate the other files first.
Cheers,
John
Please Log in or Create an account to join the conversation.
- Shawn Marshall
-
- Offline
- New Member
- Posts: 8
K2 still showed it as
Please Log in or Create an account to join the conversation.
- johnselekta
-
Topic Author
- Offline
- Junior Member
- Posts: 37
Here's what my version looks like:
I'll find the CSS too mate and get back to you.
Thanks
John
Please Log in or Create an account to join the conversation.
- johnselekta
-
Topic Author
- Offline
- Junior Member
- Posts: 37
Here's what my version looks like:
The image is floated left by default, I don't see any CSS tweaks in my code. Its set up as a menu item like this - K2 » Itemlist / Category
Hope this helps,
John
Please Log in or Create an account to join the conversation.
- Shawn Marshall
-
- Offline
- New Member
- Posts: 8
Do I place your file in components/com_k2/templates/default/?
Please Log in or Create an account to join the conversation.
- johnselekta
-
Topic Author
- Offline
- Junior Member
- Posts: 37
YOURSITE.com/templates/YOURTEMPLATE/html/
You can just upload my extracted ZIP to that location - it should rearrange just fine then. Its an override rather than a core hack if you catch my drift. Your menu item is set up perfectly.
Please Log in or Create an account to join the conversation.
- johnselekta
-
Topic Author
- Offline
- Junior Member
- Posts: 37
YOURSITE.com/templates/YOURTEMPLATE/html/
The folder you referenced is where you copy the stuff from, to activate the override. Then you work in your /templates/html/com_k2 folder. You can leave components/com_k2 alone completely so it should stick when K2 gets updated with any luck!
Simple way is just upload my extracted ZIP to templates/yourtemplate/html/(com_k2) - it should work just fine then. Its an override rather than a core hack if you catch my drift which means all work happens in your template folder. Your menu item is set up perfectly.
Please Log in or Create an account to join the conversation.
- Shawn Marshall
-
- Offline
- New Member
- Posts: 8
/mysite.com/templates/mytemplate/html/com_k2/default/ but I still get this on the front page
I will try some other things
Please Log in or Create an account to join the conversation.
- johnselekta
-
Topic Author
- Offline
- Junior Member
- Posts: 37
Please Log in or Create an account to join the conversation.
- Belén M.
-
- Offline
- New Member
- Posts: 16
Please Log in or Create an account to join the conversation.