Keyword

Slightly rearrange the layout of articles

  • Oceanwatcher
  • Oceanwatcher's Avatar Topic Author
  • Offline
  • Elite Member
More
15 years 10 months ago #68018 by Oceanwatcher
Slightly rearrange the layout of articles was created by Oceanwatcher
I would like to change the order of the things displayed on the frontpage and in the article view.

On the frontpage, I would like to have the category on top as a grey bar. Then I would like to have the picture displayed and then the rest.

I would like to get rid of the voting system both on the frontpage and in the articles.

I would like a similar display in the full article view. The main picture on top and then the rest under.

Is there an easy way to achieve this? What files do I need to change? As this has nothing (at least the basic stuff) to do with styling, I guess there are a couple of php files that need to be changed, not CSS (yet :-) )

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

  • Oceanwatcher
  • Oceanwatcher's Avatar Topic Author
  • Offline
  • Elite Member
More
15 years 10 months ago #68019 by Oceanwatcher
Replied by Oceanwatcher on topic Slightly rearrange the layout of articles
Peter said:We solved it in the Beta Version with seperated Templates for every Category. So you can create a Special Template View for the Frontpage and an other for example Blog or News.


Yeah, I heard about that , but did not realise it applied to frontpage and to full item display. As soon as you can tell me how to do this, I will try it. I will probably need a litte guidance in where to find the things I need to change. Not a programmer or heavy developer (just heavy - lol)

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

  • Oceanwatcher
  • Oceanwatcher's Avatar Topic Author
  • Offline
  • Elite Member
More
15 years 10 months ago #68020 by Oceanwatcher
Replied by Oceanwatcher on topic Slightly rearrange the layout of articles
Peter said:It´s not a act like you maybe think :) But for which Version?


I am using K2V2pre. Tried the beta, but could not get it to work at all. This version seems to do what it should. I also have a big problem with pictures on the frontpage, but that has already been mentioned in another topic :-)

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

  • Oceanwatcher
  • Oceanwatcher's Avatar Topic Author
  • Offline
  • Elite Member
More
15 years 10 months ago #68021 by Oceanwatcher
Replied by Oceanwatcher on topic Slightly rearrange the layout of articles
This is what is called a template override, right?

As what I wanted to change (mainly - I want to change the itemlist/frontpage as well :-) ), should it not be the item folder that I should work on first?

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

  • Oceanwatcher
  • Oceanwatcher's Avatar Topic Author
  • Offline
  • Elite Member
More
15 years 10 months ago #68022 by Oceanwatcher
Replied by Oceanwatcher on topic Slightly rearrange the layout of articles
I am sorry, my first language is not English, so I sometimes have a little problem understanding. Let me show you what I am looking for.

Here is a view of the order I want things in for my frontpage (done with iJoomla):

www.datahverdag.com/joomla/index.php?option=com_magazine&Itemid=13

Don't worry about the styling here, it is the order of things that is important.

This is the current frontpage:

www.datahverdag.com/joomla

Click on the main article on the current frontpage. What I would like there is to move the Picture to the top.

So there are two separate things here, but both relate to reordering of the content.

I finally found out how to remove the things I did not want on the frontpage, so it has been cleaned up considerably. Now I just need some re-ordering :-)

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

  • Oceanwatcher
  • Oceanwatcher's Avatar Topic Author
  • Offline
  • Elite Member
More
15 years 10 months ago #68023 by Oceanwatcher
Replied by Oceanwatcher on topic Slightly rearrange the layout of articles
Thank you. I really appreciate your help.

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

  • Oceanwatcher
  • Oceanwatcher's Avatar Topic Author
  • Offline
  • Elite Member
More
15 years 10 months ago #68024 by Oceanwatcher
Replied by Oceanwatcher on topic Slightly rearrange the layout of articles
Is it ok to drop the itemcatid? I am displaying stories from 5 different categories on the frontpage and I want all of them to have the same look...

Started to put things together the way you said.

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

  • Oceanwatcher
  • Oceanwatcher's Avatar Topic Author
  • Offline
  • Elite Member
More
15 years 10 months ago #68025 by Oceanwatcher
Replied by Oceanwatcher on topic Slightly rearrange the layout of articles
So... what you say is that the template HAS to be tied to a category?

This is where I loose the logic in K2 a bit. It is supposed to free you from the Section/category problem. But in reality, it is just the same.

I want to be able to have the news from Cats, Dogs, Birds with no main category. So if I make a template for the Cats category, how will the system know that it is supposed to use this for the front page?

I can understand that it might be interesting to display articles from different categories in slightly different ways when you show the full article. But on the front page, I want all displayed the same way. And if each category has a different template, who wins the battle for the front page?

I am sorry for asking these questions. For me, this is a kind of logical problem that I have to work through. I am sure there is a good explanation for how things should be done, I am just struggling a little to connect the dots.

Again, I am very sorry for my slow brain in this matter :-)

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

  • Oceanwatcher
  • Oceanwatcher's Avatar Topic Author
  • Offline
  • Elite Member
More
15 years 10 months ago #68026 by Oceanwatcher
Replied by Oceanwatcher on topic Slightly rearrange the layout of articles
I have collected my categories under one umbrella category for now called Article Section. So maybe I can use that as name for the templates.

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

  • Oceanwatcher
  • Oceanwatcher's Avatar Topic Author
  • Offline
  • Elite Member
More
15 years 10 months ago #68027 by Oceanwatcher
Replied by Oceanwatcher on topic Slightly rearrange the layout of articles
Oops. This forum is a bit confusing. Not easy to always get things in the right places as you are allowed to add posts into the thread higher up...

Anyway - what i said was that I have collected the important categories under one main category - Articles Section. So it will probably work creating templates for that category?

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

  • Oceanwatcher
  • Oceanwatcher's Avatar Topic Author
  • Offline
  • Elite Member
More
15 years 10 months ago #68028 by Oceanwatcher
Replied by Oceanwatcher on topic Slightly rearrange the layout of articles
Let me try to see if I got it right:

The category that I have the important categories under is called "Article section" and the category id of it is 2.

Under this, I have the following categories with ID's:

Audio - 3
Video - 4
Foto - 5
Kontoret - 6
Internett - 7
Andre programmer - 9

template/com_k2/itemlist should have

- default.php
- default_catid_Article section.php
- default_item.php
- default_item_Article section.php

template/com_k2/item should have

- default_item.php
- default_itemcatid_2.php

Does this look correct?

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

  • Oceanwatcher
  • Oceanwatcher's Avatar Topic Author
  • Offline
  • Elite Member
More
15 years 10 months ago #68029 by Oceanwatcher
Replied by Oceanwatcher on topic Slightly rearrange the layout of articles
>now you must create a default_itemcatid_22.php for example, with the category ID from the >Category where the ITEM is located

Does this mean I have to make one file like this for every category I have articles in, or is it enough to do it for the "parent" category (as I have all categories placed under a "parent" category).

BTW - at the moment default_itemcatid_2.php in /item and /itemlist is empty. What should go in there? Should I copy it from any file in the standard K2 folders and change them?

I must admit it is still a little confusing, but I am trying to understand how it connects and what controls what.

If I can copy some existing files, I can just try to identify what parts of the file that serves the different parts of the layout and swap them around. I guess the rest would just be CSS?

One more thing - the files are in there and I do not get any error messages and I also do not see any change. Is this the way it is supposed to be?

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

  • Oceanwatcher
  • Oceanwatcher's Avatar Topic Author
  • Offline
  • Elite Member
More
15 years 10 months ago #68030 by Oceanwatcher
Replied by Oceanwatcher on topic Slightly rearrange the layout of articles
I was looking through some of the files in the K2 component and to me it looks like the file /public_html/joomla/components/com_k2/templates/default/item.php is the one that controls the display of the full articles. There is a part that seems to me is about the picture:

--- this is a really crappy forum system! Trying to paste some code in here did not work at all and there is no function here for displaying codeboxes... Is this really fit for support at all?
Will have to find a different way for displaying the code.


As this is inside the itembody div, I am not sure what will happen if it is moved out and put in the header div.

I am not sure that I have found the right one, but it looks like that for me at least :-) I am learning a lot by going through all this!

Thank you for taking the time to do this!

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

More
15 years 7 months ago #68031 by krmr
first: you remove voting from settings tabs on category view level, items in category view, item view.
the rest of your wishes are actualy there

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


Powered by Kunena Forum