Choosing category for pligg sites

Stroks

Client
Регистрация
09.02.2012
Сообщения
219
Благодарностей
14
Баллы
18
Is there any simple way to choose category by for pligg sites by name of the category.

I am able to select the first available category (using select tag), but i cannot select a specific category such as "General". I can choose a category only using some kind ID.

I can match a category with an ID but using Regex but i hope there is a simpler way to do this.
 

Stroks

Client
Регистрация
09.02.2012
Сообщения
219
Благодарностей
14
Баллы
18
Actually i did it using regex - <option\ value="\d*[\w\W]*?(Internet|General)[\w\W]*?</option>

Any easier solution?
 

Stroks

Client
Регистрация
09.02.2012
Сообщения
219
Благодарностей
14
Баллы
18
The category id is then the number of occurences of <option\ value=" minus 1.
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113
select - Set - selecteditems
And use as value something like:
Regex:yourregex
 

Stroks

Client
Регистрация
09.02.2012
Сообщения
219
Благодарностей
14
Баллы
18
It works. However when i use Regex:(General|.*) if the keyword General isn't present then the last category from the list is selected. Is there a way to choose the first one instead. I mean is it posible for regex .* to match the first selected item not the last one.
 

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