Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Topic closed
[archived] mic_permlink: custom permlink
Notice: This thread is archived, this plugin is no longer available.
**********************************************************
As I previously announced, here is my custom permalinks plugin
It is designed to be used in combination with sgb_url_handler, to display different URL schemes in different sections.
It’s really simple to use: it works exactly as the original permlink tag, but using the mode attribute you can specify the URL scheme to be generated.
Valid mode values are (values on the same row are aliases):
- section or section_title
- section_id or section_id_title
- date or year_month_day_title
- id or id_title
- title ot title_only
- messy
Example:
<pre><txp:mic_permlink mode=“date” /></pre>
will be rendered as:
<pre><a href=”/2005/03/25/example-title” title=”…”>Example Title</a></pre>
Last edited by micampe (2005-03-27 14:23:59)
Offline
Re: [archived] mic_permlink: custom permlink
Sweet!
Offline
Re: [archived] mic_permlink: custom permlink
Great. I’ve been wanting different URLs for by blog all along. Thanks for that. Will have time to try it out next week.
Offline
Re: [archived] mic_permlink: custom permlink
Thanks micampe. This looks great, I was waiting for this before releasing the next revision of sgb_url_handlers :)
- sgb
Offline
Re: [archived] mic_permlink: custom permlink
I love this plugin, great work, thanks!
Johan Nilsson
Offline
#6 2005-04-03 02:14:36
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [archived] mic_permlink: custom permlink
You need to fix the ‘help’ part of the plugin. :)
Offline
Re: [archived] mic_permlink: custom permlink
Thank you mary, it’s fixed now.
Offline
Re: [archived] mic_permlink: custom permlink
micampe, is there a way for it to output just the link, so i can use it to generate links in the form:
<code>
<txp:mic_permlink mode=“section_category_title” /><txp:thumbnail /></mic_permlink>
</code>
?
~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~
Offline
Re: [archived] mic_permlink: custom permlink
kemie, my plugin is meant to build articles permalinks, I don’t manage images with TXP so I haven’t tested it.
The plugin builds an entire anchor tag, including the text you specify as the anchor text: that’s how I build my permalinks. Can you give an example of the output you need?
Offline
Re: [archived] mic_permlink: custom permlink
micample, i managed to get around this using sungodbiff’s hack to permit a default permalink setting of section/category/title
but in case it is useful what i wanted to do is the following:
to output thumbnails of my portfolio pages, i use an article list with a form which is
<code>
<txp:permlink /><txp:thumbnail /></permlink>
</code>
which allows me to have a group of thumbnails that link to their respective articles. I wanted to use your plugin to be able to generate that permlink, but without the text.
Thank you for your help anyway :)
~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~
Offline
Pages: 1
Topic closed