Keyword

Front page grid challenge

  • Jonas Gythfeldt
  • Jonas Gythfeldt's Avatar Topic Author
  • Offline
  • New Member
More
12 years 7 months ago #62287 by Jonas Gythfeldt
Front page grid challenge was created by Jonas Gythfeldt
After spending god knows how many hours in the community, watching videos, reading tutorials and even posting in this very forum - I have learned very little.

I am, however, very close to my goal. The only thing (I think) that I have not been able to figure out is:

<em>How to show a grid of my main level categories with their (linked) category images (and nothing else) on the front page (and ONLY on the front page). Mind you, other non-k2 and k2 modules located on the front page most work too.</em>

I'm pretty sure this (for some strange reason) cannot be done without rewriting category.php. Any objections (William?)?

I have a feeling that this is a pretty simple code-rewrite. I might be mistaken, but it's hard for me to know since I can only read a fraction of the php involved.

So. If I'm right: could anyone give me some pointers as to what code to re-write in category.php - or is this one of those questions that will not be answered unless it's posted in the "Seeking professional (paid) services for K2?" - topic? If so - name your price.

Best regards!

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

More
12 years 7 months ago #62288 by william white
Replied by william white on topic Re: Front page grid challenge
Jonas, Whatever you want to do, does not depend on me. I am a volunteer here, and have been for several years. There is still a wealth of information archived on the community.getk2.org site that you may find usefull

If you have K2 installed you can read ever line of code that k2 includes. I find myself reading the code to figure out things many times.

I pointed you to the solution that i have used to avoid the rewrite of the code myself as you speak of.

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

  • Jonas Gythfeldt
  • Jonas Gythfeldt's Avatar Topic Author
  • Offline
  • New Member
More
12 years 7 months ago #62289 by Jonas Gythfeldt
Replied by Jonas Gythfeldt on topic Re: Front page grid challenge
William. I am sorry. I see now that my comment is unclear and can be read as a negative remark on your behalf. That was not my intention. After all, pretty much all I have learned in here - I've learned from you. I guess we have to write this one on a language-barrier-account. Hope that's OK?

That beeing said. I do have K2 installed, I have read lots of the code severeal times and I have tried to follow your directions - but I'm still at a lost.

Now, I don't like to give up. That's why i figured I had to reformulate my question to make it as prescise as possible (and on top - offer to pay for the answer).

I do have to disagree with you on one point though William. I do not think there is a wealth of usefull information on this site compared to most other large extention/plug-in sites I have come across. This site could do with some good tutorials on basic configuring of k2.

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

More
12 years 7 months ago #62290 by william white
Replied by william white on topic Re: Front page grid challenge
Thanks, There was more reference on the old site community.getk2.org, but it has been removed. I think more will be appearing soon, but it will take a while for it to be 2.5 specific as everyone is changing their code to work with 2.5.
There is no pm here, so if your on joomla forum, pm me at wwhite and send me the override your working on and i will take a look at it

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

  • Jonas Gythfeldt
  • Jonas Gythfeldt's Avatar Topic Author
  • Offline
  • New Member
More
12 years 7 months ago #62291 by Jonas Gythfeldt
Replied by Jonas Gythfeldt on topic Re: Front page grid challenge
Thanks for understanding.

I've pretty much gone through a process where I've stripped down category.php to it's bear bones and put it back together again without figuring out where to modify anything :-( So now I'm back to scratch with an unmodified cataolg.php.

I'm suspecting I would have to write something to manipulate the class K2ViewItemlist (located in view.html.php?) to show all my main categories (by ID) and insert them under the class itemListCategoriesBlock in cataolog.php?

If I'm on the right track - that would mean that I would have to be able to understand how view.html.php actually works, but I guess that's gonna take me a few months... I don't even understand why there are three files in that folder (view.html.php, view.feed.php and view.raw.php)...

As you probably understand - I'm not seeing the forest for all the trees here...

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

More
12 years 7 months ago #62292 by william white
Replied by william white on topic Re: Front page grid challenge
Try to stay out of the core. Start with an override. edit category.php and category_item.php
place html code in each file outside of the php tag so it will show you what its doing and where
You can comment out or delete entire blocks of code or rearrange them to suit your needs.
Its a blend of the k2 params and the files in the override.
at least thats the way i did it

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

  • Jonas Gythfeldt
  • Jonas Gythfeldt's Avatar Topic Author
  • Offline
  • New Member
More
12 years 7 months ago #62293 by Jonas Gythfeldt
Replied by Jonas Gythfeldt on topic Re: Front page grid challenge
I've done this a while back.

www.helgelandsmoen.no/myhrvold/index.php/itemlist/category/2

But since the array I am interested in displaying is not created in category.php, I will have to manipulate something.

I'm not worried about changing the design. That's the easy part. The problem is getting k2 to show the array I want where I want it (on the front page). I don't see how I can do this by just tampering a little bit with category.php.

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


Powered by Kunena Forum