Show category title?
Show category title?
Is there a way to add the category's title to the top of the page once you get into the category?
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Show category title?
Hi!
You can put these variables into your index.tpl or entries.tpl file:
(http://www.s9y.org/102.html#A33)
Regards,
Garvin
You can put these variables into your index.tpl or entries.tpl file:
Code: Select all
{$category_info.category_name}
{$category_info.category_description}
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/
# 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/
Hmmm not sure about how to do this. In Index.tpl I can see no logical place to paste that. In entries.ptpl I tried it somewhere in here:
<div class="serendipity_entry serendipity_entry_author_{$entry.author|@makeFilename} {if $entry.is_entry_owner}serendipity_entry_author_self{/if}">
{if $entry.categories}
<span class="serendipity_entryIcon">
{foreach from=$entry.categories item="category"}
{if $category.category_icon}
<a href="{$category.category_link}"><img class="serendipity_entryIcon" title="{$category.category_name|@escape}{$category.category_description|@emptyPrefix}" alt="{$category.category_name|@escape}" src="{$category.category_icon}" /></a>
{/if}
{/foreach}
</span>
{/if}
<div class="serendipity_entry_body">
{$entry.body}
</div>
Bu that didn't work either
<div class="serendipity_entry serendipity_entry_author_{$entry.author|@makeFilename} {if $entry.is_entry_owner}serendipity_entry_author_self{/if}">
{if $entry.categories}
<span class="serendipity_entryIcon">
{foreach from=$entry.categories item="category"}
{if $category.category_icon}
<a href="{$category.category_link}"><img class="serendipity_entryIcon" title="{$category.category_name|@escape}{$category.category_description|@emptyPrefix}" alt="{$category.category_name|@escape}" src="{$category.category_icon}" /></a>
{/if}
{/foreach}
</span>
{/if}
<div class="serendipity_entry_body">
{$entry.body}
</div>
Bu that didn't work either
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
The logical place depends on where you want the text to appear, of course.
I'd suggest you place the variable immediately before the {$CONTENT} variable inside index.tpl.
Best regards,
Garvin
The logical place depends on where you want the text to appear, of course.
I'd suggest you place the variable immediately before the {$CONTENT} variable inside index.tpl.
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/
# 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/
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Hm, it works here. As soon as I select a category, the text will be shown. Of course in the default start view, a category is not set and thus you wouldn't see anything there.
Which s9y version are you using now?
Regards,
Garvin
Hm, it works here. As soon as I select a category, the text will be shown. Of course in the default start view, a category is not set and thus you wouldn't see anything there.
Which s9y version are you using now?
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/
# 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/
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
It doesn't work in versions older than 0.9.1.
Regards,
Garvin.
It doesn't work in versions older than 0.9.1.
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/
# 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/
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
No progress on upgrading oyur s9y? You really should do that if you want your client to have an installation that could not be exploited/hacked easily.
phpMyAdmin wouldn't really be too hard...and upgrading s9y also not.
Of course you can always upgrade without a backup, but in case something goes wrong, this would be bad.
Best regards,
Garvin
No progress on upgrading oyur s9y? You really should do that if you want your client to have an installation that could not be exploited/hacked easily.
phpMyAdmin wouldn't really be too hard...and upgrading s9y also not.
Of course you can always upgrade without a backup, but in case something goes wrong, this would be bad.
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/
# 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/
That was a nice tip.
... works fine and looks really nice with the category images as separator.
Thank you, Garvin!
/edit
stupid eni ... have to think about hiding it at the main page^^ ... hmhmhm
Code: Select all
<a id="main"></a>
<h2>Category: <em>{$category_info.category_name}</em></h2>
<p><em>{$category_info.category_description}</em></p>
<img class="serendipity_entryIcon" title="{$category.category_name|@escape}" alt="" src="{$category.category_icon}" />
<br />
{$CONTENT}{$raw_data}
Thank you, Garvin!
/edit
stupid eni ... have to think about hiding it at the main page^^ ... hmhmhm
Sorry, I'm Late. But I Got Lost On The Road Of Life.
Garvin recently added a boolean variable, $startpage, to indicate if you're on the startpage. You could template like:
Code: Select all
{if not $startpage}
<h2>Category: <em>{$category_info.category_name}</em></h2>
<p><em>{$category_info.category_description}</em></p>
<img class="serendipity_entryIcon" title="{$category.category_name|@escape}" alt="" src="{$category.category_icon}" />
<br />
{/if}