Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2009-04-10 02:34:59
- _n
- Member
- Registered: 2005-07-13
- Posts: 44
select and go menu for links in an article?
Is there a way to use textpattern’s internal jump menu (for categories and sections) to display link categories instead?
I’ve looked at glz_custom_fields as a an option (its pretty robust), but I’m not sure if its what I need.
Basically I’m making a purchase list for books that will link to amazon / indigo etc. Each book has its own set of links to where you can purchase it. Basically giant ugly long links. So I figured I could put them all in a select and go menu.
Suggestions?
thanks!
Edit: Found a solution this time around, would still be curious about people’s opinions though.
Last edited by _n (2009-04-10 04:23:28)
Offline
Re: select and go menu for links in an article?
_n wrote:
Edit: Found a solution this time around
Sorry, I can’t think of any obvious solution. Care to share yours so others can do the same in future? :-)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#3 2009-04-10 13:42:20
- _n
- Member
- Registered: 2005-07-13
- Posts: 44
Re: select and go menu for links in an article?
Oh sure. my solution turned out to be pretty simple because the person I’m doing this for, ended up having 3 consistent retailers. So what I did is assign a custom field for each link and then dropped that field inside a select + go menu. Its not fancy but it works. ;)
eg: <option value=”<txp:custom_field name=“amazon.com-link” />” selected>Amazon.com</option>
Then to give him a custom retailer (because he may want to toss in a buy this from the publisher link) I just did this:
<option value=”<txp:custom_field name=“custom retailer 1 link” />”><txp:custom_field name=“custom retailer 1 name” /></option>
as i said its not fancy but it works for this. However I’d like to look at ways of making this more flexible for future use. ie: I’d like to find a way to tie link categories into drop downs. Would be handy.
Last edited by _n (2009-04-10 13:43:22)
Offline
Re: select and go menu for links in an article?
_n wrote:
as i said its not fancy but it works for this. However I’d like to look at ways of making this more flexible for future use. ie: I’d like to find a way to tie link categories into drop downs. Would be handy.
What about this untested method?
<txp:linklist form="Links" category="book1" limit="100" sort="linksort" />
where the Links form looks like
<option name="<txp:link_url />"><txp:link_name escape="html" /></option>
The caveat is that you’ll have to have a link category/book
Last edited by colak (2009-04-10 15:03:42)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline