Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Mixed menu with section, category, articles
Hello to TXP users!
I wonder if it would be possible to create a user friendly mixed menu where one can easily add sections, categories, separate articles without messing with the TXP codes, something like menu in WP where you can add any link you want, for example.
In a strict menu like “section – article” it is possible to do right from Write panel if articles to be added to the top menu can be designated either through a special category, section or custom field. But what if one needs something like that:
Catalog – (Top Menu)
|
Article 1
Article 2
Section 1
Section 2
Category 1
Is there any chance to accomplish this? If this issue was discussed could a link be provided?
Thanx.
Offline
Re: Mixed menu with section, category, articles
Why wouldn’t you just create Links to desired elements, and use <txp:linklist />
?
Offline
Re: Mixed menu with section, category, articles
Thanks for the idea. Never thought about it. I always perceived <txp:linklist /> as a tool for external links. But it can help. Not convenient though if there are too many links to be created.
Last edited by admi (2013-07-03 19:26:16)
Offline
Re: Mixed menu with section, category, articles
This very basic plugin helps in creating links to existing articles, categories, sections and so on, by appending respective combo-boxes to the Link edit form.
# Name: etc_link_helper v0.1
# Type: Admin side plugin
#
# Author:
# URL:
# Recommended load order: 5
# .....................................................................
# This is a plugin for Textpattern CMS - http://textpattern.com/
# To install: textpattern > admin > plugins
# Paste the following text into the 'Install plugin' box:
# .....................................................................
YToxMTp7czo0OiJuYW1lIjtzOjE1OiJldGNfbGlua19oZWxwZXIiO3M6NjoiYXV0aG9yIjtz
OjA6IiI7czoxMDoiYXV0aG9yX3VyaSI7czowOiIiO3M6NzoidmVyc2lvbiI7czozOiIwLjEi
O3M6MTE6ImRlc2NyaXB0aW9uIjtzOjA6IiI7czo0OiJjb2RlIjtzOjMwNTQ6InJlZ2lzdGVy
X2NhbGxiYWNrKCdldGNfbGlua19zZWxlY3QnLCAnbGlua191aScsICdleHRlbmRfZGV0YWls
X2Zvcm0nKTsNCnJlZ2lzdGVyX2NhbGxiYWNrKCdldGNfbGlua19qcycsICdhZG1pbl9zaWRl
JywgJ2Zvb3RlcicpOw0KDQpmdW5jdGlvbiBldGNfbGlua19zZWxlY3QoKSB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SA9ICQoIiNsaW5rbmFtZSIpLnZhbCgpLCAkdXJsID0gJCgi
I3VybCIpLnZhbCgpOw0KCSQoIiNldGMtbGluay1wYW5lIHNlbGVjdCIpLmNoYW5nZShmdW5j
dGlvbigpIHsNCgkJJCgiI2xpbmtuYW1lIikudmFsKCQodGhpcykuY2hpbGRyZW4oIm9wdGlv
bjpzZWxlY3RlZCIpLmZpcnN0KCkudGV4dCgpKTsNCgkJJCgiI3VybCIpLnZhbCgkKHRoaXMp
LnZhbCgpKTsNCgl9KTsNCg0KCSQoIiNldGMtbGluay1wYW5lIGlucHV0W25hbWU9XCdldGMt
bGluay10eXBlXCddIikuY2hhbmdlKGZ1bmN0aW9uKCkgew0KCQl2YXIgJHZhbCA9ICQodGhp
cykudmFsKCk7DQoJCSQoIiNldGMtbGluay1wYW5lIHNlbGVjdCIpLmF0dHIoImRpc2FibGVk
IiwiZGlzYWJsZWQiKTsNCgkJaWYoJHZhbCkgJCgiI2V0Yy1saW5rLSIrJHZhbCkuYXR0cigi
ZGlzYWJsZWQiLG51bGwpLnRyaWdnZXIoImNoYW5nZSIpOw0KCQllbHNlIHskKCIjbGlua25h
bWUiKS52YWwoJG5hbWUpOyAkKCIjdXJsIikudmFsKCR1cmwpfTsNCgl9KTsNCn0pOycpOw0K
CXJldHVybiAkcnMubi4kb3V0Ow0KfSI7czo0OiJ0eXBlIjtzOjE6IjMiO3M6NToib3JkZXIi
O3M6MToiNSI7czo1OiJmbGFncyI7czoxOiIwIjtzOjQ6ImhlbHAiO2I6MDtzOjM6Im1kNSI7
czozMjoiNGQ2NGU5NjQ4MzdjNzU4YzhhNzM4ZDViY2FmMTMxM2YiO30=
Last edited by etc (2013-07-04 12:41:03)
Offline
Re: Mixed menu with section, category, articles
Thanx, Oleg!
You really help me stay loyal to TXP each time a doubt arise in my mind! I will try the code. But I also like the idea to use Links with no plugins in some cases.
Did you write the plugin just yesterday? Or was it created a long time ago but I did not know about it?
Last edited by admi (2013-07-04 14:07:12)
Offline
Re: Mixed menu with section, category, articles
Great if so!
admi wrote:
But I also like the idea to use Links with no plugins in some cases.
The idea seems natural, though I would never thought of it without your question. The plugin only helps to avoid copy-paste for txp own links, nothing more for the moment.
Did you write the plugin just yesterday? Or was it created a long time ago but I did not know about it?
Yes, I become a prolific txp-addict. :)
Offline
Re: Mixed menu with section, category, articles
Why don’t you put your etc_zem and this one on your site? Many TXP plugins remain unknown to many txp users.
Offline
Re: Mixed menu with section, category, articles
admi wrote:
Why don’t you put your etc_zem and this one on your site? Many TXP plugins remain unknown to many txp users.
+1. :) You could also add them in the .org site and open threads in this forum:)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: Mixed menu with section, category, articles
admi wrote:
Why don’t you put your etc_zem and this one on your site?
I generally do, but this one is only 1 day old. :) As for etc_zem
, it is too exotic. Given all the spam an average site gets (may Jukka be thanked again for rah_comment_spam
!), I don’t think many admins would allow visitors publish (even draft) articles on their site.
colak wrote:
You could also add them in the .org site
I agree, but how do you get there? I thought the plugin author status gives you access to .org, but apparently it doesn’t.
Offline
Re: Mixed menu with section, category, articles
etc wrote:
I don’t think many admins would allow visitors publish (even draft) articles on their site.
As a matter of fact, etc_zem is very needed plugin. Imagine a catalog site where front-end user submits his company’s info. May be, it needs to be more perfected but it will make TXP status higher among other CMS.
Offline
Re: Mixed menu with section, category, articles
etc_link_helper is out.
admi wrote:
As a matter of fact, etc_zem is very needed plugin. Imagine a catalog site where front-end user submits his company’s info. May be, it needs to be more perfected but it will make TXP status higher among other CMS.
Front-end users will most probably have no idea of Textile, and submit some Office-generated HTML code. This will result in a very weird markup, nearly impossible to clean up automatically.
Offline
#12 2013-07-04 20:04:00
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Mixed menu with section, category, articles
etc wrote:
I agree, but how do you get there? I thought the plugin author status gives you access to .org, but apparently it doesn’t.
No it doesn’t, but if you contact Stef, no doubt he will send you a login.
Offline