sorry, but have to know another item:
i wonder whether there is a variable like $is_single_entry that tells me, whether i have selected a category and have displayed all entrys of a certain category..
(i have to suppress a certain category in normal view of the blog and display it only, if this category is selected ..)
is there a list anywhere, which variables of s9y are available for smarty templating? (i think, there are extreme clever things to do with that smarty engine and s9y..!)
tnx!
snafu
how to know whether acual view mode is category overview!
how to know whether acual view mode is category overview!
Last edited by snafu on Mon May 29, 2006 12:56 pm, edited 1 time in total.
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: how to know whether acual view mode is category overview
Hi!
You can check {$category}, which contains the categoryid if the user is browsing a category...?
Best regards,
Garvin
You can check {$category}, which contains the categoryid if the user is browsing a category...?
Have a look here: http://www.s9y.org/102.htmlis there a list anywhere, which variables of s9y are available for smarty templating? (i think, there are extreme clever things to do with that smarty engine and s9y..!)
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/
Re: how to know whether acual view mode is category overview
hm.garvinhicking wrote:Hi!
You can check {$category}, which contains the categoryid if the user is browsing a category...?
{$category} seems to be an array, and i tried to debug me this category id , but this did not work:
Code: Select all
category0 = {$category[0]}<br />
category1 = {$category[1]}<br />
category2 = {$category[2]}<br />
category3 = {$category[3]}<br />
i ask for some understanding for my lack of knowledge at this point
oh, thank you, didnt found that under css, fine!garvinhicking wrote: is there a list anywhere..
Have a look here: http://www.s9y.org/102.html
tnx
snafu
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: how to know whether acual view mode is category overview
Hi!
$category is not an array!
Check it with {$category|@print_r} (you might need to set $serendipity['smarty']->security = false; in your template'S config.inc.php).
Best regards,
Garvin
$category is not an array!
Check it with {$category|@print_r} (you might need to set $serendipity['smarty']->security = false; in your template'S config.inc.php).
That might be because this document didn't exist until your posting. *g*oh, thank you, didnt found that under css, fine!
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/
Re: how to know whether acual view mode is category overview
really? if i try this:garvinhicking wrote:Hi!
$category is not an array!
Code: Select all
category = {$category}<br />
category = Array
...1,2, testing ...
ok, got it:
{if $category.categoryid=="14"}
## kategorieansicht kleinanzeigen<br />
{/if}
$category.categoryid holds the number of category, if user is browsing category
haha, documantation is mapped into user memory, if requestedoh, thank you, didnt found that under css, fine!
That might be because this document didn't exist until your posting. *g*
thank you!
snafu
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: how to know whether acual view mode is category overview
Hi!
Hm, it really should not be an array, because inside include/functions_smarty.inc.php this is used:
So the only way, "$category" might become an array if in your template you somewhere have a foreach loop or so, where $category is assigned on its own and overwrites the original smarty value.
In that case you should use {$category_info.categoryid} as your variable; else you might catch/use a wrong variable.
Which template and s9y version are you using?
Regard,s
Garvin
Hm, it really should not be an array, because inside include/functions_smarty.inc.php this is used:
Code: Select all
if (isset($serendipity['GET']['category'])) {
$category = (int)$serendipity['GET']['category'];
In that case you should use {$category_info.categoryid} as your variable; else you might catch/use a wrong variable.
Which template and s9y version are you using?
Regard,s
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/
Re: how to know whether acual view mode is category overview
i never wrote anything like this...garvinhicking wrote:Hi!
So the only way, "$category" might become an array if in your template you somewhere have a foreach loop or so, where $category is assigned on its own and overwrites the original smarty value.
1.0-beta3 and a template of my own, based on somthin i cannot remember.garvinhicking wrote: Which template and s9y version are you using?
it is wierd, because i can get the right number out of this variable, so that i can select this entry ..
ill try it out a bit later, have to have an appointment right now...
tnx in advance!
snafu
Re: how to know whether acual view mode is category overview
{$category.categoryid|@print_r}
shows
shows
Code: Select all
Array ( [entryid] => 121 [categoryid] => 7 [category_name] => Veranstaltungen [category_description] => [category_icon] => [parentid] => 0 [category_link] => http://xs4all.xs.funpic.de/cms1/index.php?/categories/7-Veranstaltungen ) 1
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: how to know whether acual view mode is category overview
Hi!
Please search all your *.tpl files plus the one in "default" to see if there is any mention of "category" or "$category". I think this was a bug that has been fixed in either the 1.0 or the 1.1 branch and the default templates...
Regards,
Garvin
Please search all your *.tpl files plus the one in "default" to see if there is any mention of "category" or "$category". I think this was a bug that has been fixed in either the 1.0 or the 1.1 branch and the default templates...
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/
Re: how to know whether acual view mode is category overview
there are some lines using this vatiable, likegarvinhicking wrote:Hi!
Please search all your *.tpl files plus the one in "default" to see if there is any mention of "category" or "$category". I think this was a bug that has been fixed in either the 1.0 or the 1.1 branch and the default templates...
Regards,
Garvin
<a href="{$category.category_link}"> ... and ..
{if $category.category_icon}
for instance.
i think, instead of debugging the templates, i will wait for the next release and write my template from scratch, as there are some more wishes from my users...
thank you so far!
snafu