Comic Adaption: Sidebar link to latest not on Frontpage

Creating and modifying plugins.
Post Reply
Allstar
Regular
Posts: 9
Joined: Fri Jul 14, 2006 8:45 pm
Contact:

Comic Adaption: Sidebar link to latest not on Frontpage

Post by Allstar »

'Extended properties for entries' plugin I am able to hide the comic entries from the frontpage but since I have hidden the comic category aswell there is no sign of them to the general public.

What I would like like to do is on the frontpage have only text entries and not the comic at the top or listed. The most recent comic can be seen from a sidebar link saying most recent/latest comic and that links to the most recent comic where the usual, first, previous. next, last links appear.

Reason being I want the first page to load as fast as possible and not constantly have a 640x640 picture at 200kb to load which also breaks the page layout.

How would this be done?
"The price of greatness is responsibility."
Sir Winston Churchill
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Comic Adaption: Sidebar link to latest not on Frontpage

Post by garvinhicking »

Hi!

I sadly don't know that much of the comic plugin, so I try to use a more general approach. I hope it is not redundant.

I think the most flexible solution is this:

1. Create a "Custom Entryproperty" field that says "is_comic". For the comic entries, you set this variable to "1". We will need that for a Smarty checkup in the entries.tpl.

2. Edit your entries.tpl file. In the place where the foreach loop starts, you can add a smarty check:

Code: Select all

{if $startpage AND $entry.properties.ep_is_comic == 1}
.... ALL THE STUFF FOR PRINTING ENTRIES
{/if}
This would then hide comic entries from the startpage only if the "comic" flag is set...

Maybe this idea helps a bit, if not I'll try to look more into this at the end of the week.

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

I haven't seen the comic plugin, either. If it uses its own class on the frontpage, you may be able to get rid of the images with just .thatclass img { display:none; } in your CSS.

If you give us a link to the page, we can check it out.
Judebert
---
Website | Wishlist | PayPal
Post Reply