Page 1 of 11
uCoz Community » uCoz Modules » File Catalog, Site Catalog, Publisher, Ad Board, Online Games » Display/refer to informer(categories) elements separately?
Display/refer to informer(categories) elements separately?
Ciro
Posts: 6
Reputation: 0

Message # 1 | 3:29 PM
I found out that I could use informers to display my categories, but I still have a little problem.

This is how I want to display the categories:
(The same format/order/nesting as how I see them in the control panel; I'd numbers are included here just for reference)

Section1 [id:1]
- category [id:2]
- category [id:3]
- category [id:4]
- category [id:5]
- category [id:6]

Section2 [id:7]
- category [id:8]
- category [id:9]
- category [id:10]
:
- category [id: n]

Now, If I don't specify an id number in creating the informer, all I'd get is:

Section1 [n]
Section2 [n]

Specifying the id number(of a section, for example, id 1), this is what I get:

category2 [n]
category3 [n]
category4 [n]
category5 [n]
category6 [n]

(missing the section links)
Which are both not what I need.
(I need to put them together like the format shown above, and of course I could always hard-code the links... but if there's a way that I need not to, then I won't.)

Looking at the default template for an informer..
Code
<a href="$CATEGORY_URL$" class="catName">$CATEGORY_NAME$</a> <span class="catNumData">[$NUM_DATA$]</span><?if($CATEGORY_DESCR$)?><div class="catDescr">$CATEGORY_DESCR$</div><?endif?>


.. I figured that some script uses the template for each $CATEGORY_NAME$ to display the entries (of the informer), using a loop. (by looking at the code)
So far, learning about that loop (or perhaps how exactly the $CATEGORIES$ code works/substitutes into) is what I have in mind, but I was thinking I can't get an answer to that because its like asking how ucoz works... (you know what's next)...

So the help that I need is either
- an advise whether to continue figuring out the code(perhaps with the help from this forum) or just hard-code the links,
- or the actual code/solution of how I could refer to one element so that I could display my list like the format I mentioned above
Post edited by Ciro - Tuesday, 2011-10-18, 3:29 PM
Natashko
Posts: 3366
Reputation: 171

Message # 2 | 12:41 PM
Ciro, when you create an Informer, go to Additional options and check "Return the result in JavaScript format" and "Return the full list of categories ". Embed the Informer code where you want it. And then use javascript to display the information in the way you want. But this is only for those who can code in JavaScript.
Ciro
Posts: 6
Reputation: 0

Message # 3 | 3:02 PM
That means I need to write my code JavaScript right?
Thank you very much for the quick reply. :D
Natashko
Posts: 3366
Reputation: 171

Message # 4 | 3:14 PM
Ciro,
Quote (Ciro)
That means I need to write my code JavaScript right?

Right. You might search for it, but I can't guarantee the success.
uCoz Community » uCoz Modules » File Catalog, Site Catalog, Publisher, Ad Board, Online Games » Display/refer to informer(categories) elements separately?
Page 1 of 11
Search: