Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-11-19 09:55:09

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

How2 quick insert link to category in article?

Is there plugin which can help to make link to selected category? I have a lot of categories and it’s hard to write manuly link every time.


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#2 2007-11-19 16:42:31

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: How2 quick insert link to category in article?

Do you mean txp:category1 and txp:category2?

Offline

#3 2007-11-19 18:35:45

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: How2 quick insert link to category in article?

2Els – not completly. I meen i want to insert link to category, for example in article i want to have link to category “another_category”. Attention :) – link not to assigned to article category, but link to separate category.
For ex.:
<txp:category name="another_category" title="1" link="1" wraptag="p" />

As far as i have a lot of categories it’s hard to insert required category.


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#4 2007-11-19 20:02:40

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: How2 quick insert link to category in article?

Okay, so you want to link to a certain category from within an article? And the category you want to link to can vary per article? What about using a custom field where you enter the category, and asy_wondertag. You could put this in your article form:

<txp:asy_wondertag><txp:category name="<txp:custom_field name="cat" />" title="1" link="1" /></txp:asy_wondertag>

If you wanted to link to more than one category you could also enter a comma separated list in the custom field, and use <txp:category_list categories="<txp:custom_field name="cat" />" /> (with asy_wondertag of course).

Is this what you meant?

Edit: but if you meant you’d like to be able to choose a category from a dropdown list, you’d need a plugin and as far as I know it doesn’t exist (yet).

Last edited by els (2007-11-19 20:06:05)

Offline

#5 2007-11-19 20:23:44

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: How2 quick insert link to category in article?

Els – thanks for brilliant idea about categories :) It seems to be simple non-plugin decision of multi-categories :)
But i need exactly that what you wrote after edit:

Els wrote:

Edit: but if you meant you’d like to be able to choose a category from a dropdown list, you’d need a plugin and as far as I know it doesn’t exist (yet).

I wanna to choose category and insert link to it. May be moderator can move this topic to “Plugin request”?


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#6 2007-11-20 04:25:11

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: How2 quick insert link to category in article?

Uh, the category tag accepts a name attribute.

Offline

#7 2007-11-20 14:40:32

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: How2 quick insert link to category in article?

Mary wrote:

Uh, the category tag accepts a name attribute.

Ofcourse, but if you have hundred categories and there name a transliterated from сyrillic (russain language) it’s rather hard to remember the name of category ;)


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#8 2007-11-20 15:30:01

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: How2 quick insert link to category in article?

Victor, just thought of something. Are you using both category 1 and 2? Because if not, you could use category 2 instead of the custom field and have your dropdown list.

Offline

#9 2007-11-20 17:05:42

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: How2 quick insert link to category in article?

Els wrote:

Victor, just thought of something. Are you using both category 1 and 2? Because if not, you could use category 2 instead of the custom field and have your dropdown list.

Thanks… Nice idea. Since I’m using rss_unilmited_categories I can use one of dropdown category lists. It remains to engage jquery :)


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

Board footer

Powered by FluxBB