Keyword

Blog layout issue for last item on page

  • russjman
  • russjman's Avatar Topic Author
  • Offline
  • New Member
More
13 years 2 months ago #98392 by russjman
Blog layout issue for last item on page was created by russjman
I am trying get a get a "blog" layout of items for.....well....a blog; which have at about 95%.  My issue is with the last item and CSS styling.

 

Looking at the source code i see every item is wrapped with a div with the class "itemContainer".  I also see "itemContainerLast" applied the same div as well.  I imagine this is class used to mark the last item in a row of items.  What i need is a class for the final item in a page.  Is there a way to do this using the built in K2 parameters?

 

Here is a screen shot of the settings for the "blog" category

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

More
13 years 2 months ago #98393 by BBC
Replied by BBC on topic Blog layout issue for last item on page
Little confusing, your question.

You can´t style last Item with CSS ? Or you want some control over it in Parameters ?

 

What states would you like to control in parameters ? Between what and "what".

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

  • russjman
  • russjman's Avatar Topic Author
  • Offline
  • New Member
More
13 years 2 months ago #98394 by russjman
Replied by russjman on topic Blog layout issue for last item on page
<div class="itemContainer itemContainerLast">

stuff stuff

</div>

 

<div class="itemContainer itemContainerLast">

stuff stuff

</div>

 

<div class="itemContainer itemContainerLast">

stuff stuff

</div>
 

Every item has both "itemContainer" and "itemContainerLast" class applied to it, using the settings above.  This makes it difficult to override the style sheet for the last item in a page if there is no specific class assigned to it.  The settings above is what i have to display one item per line. What i am asking is if there is some combination of param settings that i can set that will make "itemContainerLast", or whatever other class, be applied to the last item on the page?

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

More
13 years 2 months ago #98395 by BBC
Replied by BBC on topic Blog layout issue for last item on page
Set leading counts in Category settings as you wish. Then set just one for secondary count and style div "div#itemListSecondary".

 

I just tested and it works.

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

  • russjman
  • russjman's Avatar Topic Author
  • Offline
  • New Member
More
13 years 2 months ago #98396 by russjman
Replied by russjman on topic Blog layout issue for last item on page
hmm.....i think i am finally understanding what leading vs primary vs secondary mean.

 

So i set the max number of items per page at 5, then set Leading Count to 1, Primary Count to 3, Secondary Count to 1.

 

1+3+1 = 5.  That way the secondary item is always the last item on the page.  Now i can do a CSS override  on "div#itemListSecondary". 

 

Just had to play around with it. Thank you for pointing me in the right direction BBC

BBC said:
Set leading counts in Category settings as you wish. Then set just one for secondary count and style div "div#itemListSecondary".

 

I just tested and it works.

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

More
13 years 2 months ago #98397 by BBC
Replied by BBC on topic Blog layout issue for last item on page
You are on good way to make a circus of your website. "Less is more".

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

  • russjman
  • russjman's Avatar Topic Author
  • Offline
  • New Member
More
13 years 2 months ago #98398 by russjman
Replied by russjman on topic Blog layout issue for last item on page
story of my life.

 

If these details were up to me i would have been done with this project a month ago!

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

More
13 years 2 months ago #98399 by BBC
Replied by BBC on topic Blog layout issue for last item on page
Use "One css per template" plugin, and template override.

That way you can style categories diferrent. When you mess with all 3, leading, primary, and secondary, and style them different you can have problems later, with some Blog listing, some mixed categories menu link...etc.

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

  • russjman
  • russjman's Avatar Topic Author
  • Offline
  • New Member
More
13 years 2 months ago #98400 by russjman
Replied by russjman on topic Blog layout issue for last item on page
do you have a link to that plugin, i cant seem to find it.

 

This is my first Joomla build.  There are a number of things would have done differently, and a lot of time spent learning about the plugin system, the templating system, and what plug ins to use.

 

I really like joomla's flexibility, but it can get quite out of hand very quickly

 

BBC said:

Use "One css per template" plugin, and template override.

That way you can style categories diferrent. When you mess with all 3, leading, primary, and secondary, and style them different you can have problems later, with some Blog listing, some mixed categories menu link...etc.

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

More

Powered by Kunena Forum