Keyword

Move title next to image?

  • johnselekta
  • johnselekta's Avatar Topic Author
  • Offline
  • Junior Member
More
14 years 3 weeks ago #87691 by johnselekta
Move title next to image? was created by johnselekta
Hi I need to work out how to achieve this layout - I need image left // title and content right.Seems simple, but I can't see how to make this happen. Default K2 layout is title top 100% width, [css] clear both, then image left, content right.Can anyone help? Must be a simple tweak surely. This would gain so much space on a homepage.Thanks in advance Simon/guys!Best regards,John

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

More
14 years 3 weeks ago #87692 by william white
Replied by william white on topic Move title next to image?
Send a link to the page and view you are working on
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
  • johnselekta's Avatar Topic Author
  • Offline
  • Junior Member
More
14 years 3 weeks ago #87693 by johnselekta
Replied by johnselekta on topic Move title next to image?
Cheers for those links, much useful. Found a rough hint into it from those links, so thank you.

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.

More
13 years 11 months ago #87694 by Shawn Marshall
Replied by Shawn Marshall on topic Move title next to image?
Can you tell me more about how to do this? I'm also trying to move the title and text to the right of my picture.

Thanks

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

More
13 years 11 months ago #87695 by Shawn Marshall
Replied by Shawn Marshall on topic Move title next to image?
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
  • johnselekta's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 11 months ago #87696 by johnselekta
Replied by johnselekta on topic Move title next to image?
Managed to find it thru my phone, you're in luck!
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
  • johnselekta's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 11 months ago #87697 by johnselekta
Replied by johnselekta on topic Move title next to image?
Doh it stripped my code! I'll attach it in the morning on my computer. Apologies for that.moparlakci said:hm ok the image is in this division div class="itemImageBlock"
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
  • johnselekta's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 11 months ago #87698 by johnselekta
Replied by johnselekta on topic Move title next to image?
Managed to find it thru my phone, you're in luck!

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
  • johnselekta's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 11 months ago #87699 by johnselekta
Replied by johnselekta on topic Move title next to image?
Sorry the forum stripped it, will attach tomorrow.

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

More
13 years 11 months ago #87700 by Shawn Marshall
Replied by Shawn Marshall on topic Move title next to image?
Ok thanks I guess you could attach it and I could download it.

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


Powered by Kunena Forum