Choose a select box value from a list of words

Tropicalista

Client
Регистрация
24.05.2011
Сообщения
29
Благодарностей
0
Баллы
0
Hi,

would like to know if it's possible with zenno poster choose a dropdown select with the use of a macro: for example if I create a template where will be request the category of my site, could I build a macro that retrieve a value of the select from a text file that contains my preferred categories?

For example I could build a tmplate for the insert of a site in a directory, but my site could be everytime on different argument, for example I want submit a travel site in travel category, and another site personal blog in the blog category.
 

gcomm

Client
Регистрация
01.03.2011
Сообщения
332
Благодарностей
93
Баллы
28
If you know the exact name of the drop down field you can use it for a value;

Maybe split the example string>>> category:subcategory (travel:flights)

Another way is to call the actual field values eg >>> 4:7


I'm sure there is a much more concrete solution but this should work.
 

Tropicalista

Client
Регистрация
24.05.2011
Сообщения
29
Благодарностей
0
Баллы
0
Could you explain more? I'm new on zennoposter. I have a lot of template to directory submission. But whn I submit my site I should choos the exact category.
I have a txt file whith a list of words of category: fr example when I submit a travel site I have a list like < hotel, b&b, travel, accomodation, etc... >.

When I submit a financial site I change my list of words < loan, mortgage,business, financial etc...>

I wanna my template choose the category specified in the text file and choose the right dropdown if exists it submit, if not it skips the submission.

Is this possible?
 

gcomm

Client
Регистрация
01.03.2011
Сообщения
332
Благодарностей
93
Баллы
28
How to pull a file method -

  1. When you have created your template in ProjectMaker go into the editor and before those elements (boxes) you must make a "macro".
  2. Go to macros editor at the top > files and directories > Take a line from the file >
  3. In the bottom area click: The file to open for reading where \resources\ is
  4. Find the file you want to pull your categories from and select it...
  5. In the macros editor the dark red MACROS must be copied and pasted into the field of the drop down element (box) you want this data to be input in the "value" area of that element

I would actually compose your txt file like this Category:Subcategory with the little : between your words; Which will require "splitting" the string - We will do that below this image.


===================================================

HOW TO SPLIT A STRING-

If you are going to "Split" the file your file must look like this to accomplish this...

travel:bed breakfast
travel:flights
travel:whatever
financial:banks
financial:whatever
education:schools
education:courses
education:whatever

Instead of Going to macros editor at the top > files and directories > Take a line from the file >

Go to macros editor at the top > strings processing > split - The - # of part - in the split functions like this - Category(0):Subcategory(1)
============================================================



Right click and save as the attached project > howtosplitstring.xml
 
  • Спасибо
Реакции: Tropicalista и nuaru

Tropicalista

Client
Регистрация
24.05.2011
Сообщения
29
Благодарностей
0
Баллы
0
Many thanks for the explanation, I will try this!
 

Bryce Sadler

Новичок
Регистрация
29.01.2020
Сообщения
1
Благодарностей
0
Баллы
1

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)