No "Detail page using list 2"
-
So far doing great with this.
I can’t get a master/detail working though. I have two lists set up, both public. Both display on their respective pages fine. But in the Link Type dropdown there’s no choice to choose “Detail page using list 2” so I can link to it for the Detail page.
I’ve checked through the help and other support posts and can’t figure out why it won’t show up. I even added a third list and made it public but that doesn’t show up either.
Thanks,
MD
-
HI mad dog,
just checked it and that function is in amr-users-plus,
so either you could contribute to the development of the plugin 🙂
https://wpusersplugin.com/3422/link-from-user-directory-to-user-detail-or-profile/ – look at the bundles too https://wpusersplugin.com/related-plugins/OR
code up something yourself using the filters or formatting functions. Free Help to DIY is in the above link and belowhttps://wpusersplugin.com/2860/adding-a-link-to-user-list-field/
http://wpusersplugin.com/3809/format-a-field-as-a-link/
https://wpusersplugin.com/2940/filters/
general help
https://wpusersplugin.com/support/amr-users-documentation/I wondered about that. It wasn’t clear. I WILL be getting the plus plugin at least because I want the filtering.
One question: Is there only one “Detail page using List” in the Plus plugin or if I have several detail pages would they all be listed to choose from? (I may have several versions for different lists)
Or do I need to hand code that? I already managed to make a custom field web_site a link. (:})
Sorry about the “not clear” – the plugin and docs have been growing organically for years and I would like to take time out to do a refresh of both.
Re question:
the linktype that now gets added by amr-users actually uses the SAME page – it just passes the listnumber to use. (see examples below).The initial version using a separate page requires custom work (a teeny little function) or complicated settings because it would depend on what pages people are using (ids/urls etc) which would be different on every site.
Using the same page avoids all of that. And actually, now that you ask, it that means I could possibly, in next update, add a linktype for each lists that exists – hmm – thinking….)
If you explicitly want separate pages because you have other content on the page, then one has to edit the little example plugin – basically change the url to be the one you want.
If one wanted more options, one could just copy the ‘add linktype’ function and the linktype function and rename and change urls to suit – create as many as you want.Note: one can disable the response to the query parameter with a shortcode parameter – by default one can do (be careful can be confusing depending how lists setup!)
Examples
http://directories.wpusersplugin.com/memberdetails/?filter=1&ID=390&list=1
http://directories.wpusersplugin.com/memberdetails/?filter=1&ID=390&list=4or
http://directories.wpusersplugin.com/simple-user-list/?list=2
http://directories.wpusersplugin.com/simple-user-list/?list=4
etcNOW most folks are only using 1 or 2 lists maximum. Would you tell me what your use case is that requires multiple lists / pages? There may be some interesting ideas around that.
I’ll look this over well in the morning. I suspect adding functions to add a custom linktype may be the way to go for me.
What I have is a member site. Logged in members can see a simple Member Directory and when they click on a name link I want them to go to a pretty complete Detail page for that user.
Now if you’re NOT a member and not logged in, you can see a differently formatted Member Directory for and when they click on a name link they will see a less complete Detail page for that user.
Make sense?
Maybe I’m missing something here that’s simple and already in place for this, but for each of those two cases it seems I need a Directory and Detail list. Not a problem as long as I can link them up okay.
I’d also be interested in being able to make a link of text like “View full member details” but I don’t see any simple way to do that outside of a total workaround of creating a field that says “View full member details” for each user.
Thanks!
Linking to the same list doesn’t make sense because then it won’t show a more detailed view, it will just filter the list to show one.
Is there a function I can add that will add linktypes to the dropdown that I can modify to have the detail list #s I need to choose from? Basically, so instead of “Detail page using List 2” I could have “Detail page using List 4” if that’s what I need to link to for the detail. What you have now is okay but too restrictive in that List 1 has to be the Directory List and List 2 has to be the Detail List.
Make sense?
I don’t mind adjusting and adding to the function if I have it.
I’m puzzled this hasn’t come up often. Isn’t this a basis for how a Directory/Detail would work?
Thanks
So I added a new dropdown for LinkTypes in the plugin function file (I know, now the best place but this is for testing) and that’s simple:
$linktypes[‘detailpagelist1’] = __(‘detail page using list 1’, ‘amr_users’);
But I need to modify this so it uses a different page rather than the same one.
See links above for info on coding to your own detail pages.
ALSO Note that linking to same page WITH A LIST parameter DOES change the list used (the second could be marked as not public, so only logged in users with the right capability will see it ).
Try clicking on the examples provided and looking at what changes.
So once I sorted through it you’re saying I need this plugin: http://wpusersplugin.com/downloads/example-site-specific/
and I can modify it to add specific linktypes to the dropdown and add the functions to make it work with other forms?
If so…..ohhhh! I see.
I downloaded the plugin and couldn’t get it to work right.
I did, however, manage to get it working partly by going into the Plus Plugin file amr-users-plus.php and just changing the “2s” to “1s” so it points to List 1 rather than List 2.
1. I’d still rather this was a separate function (not a plugin) so I don’t have to worry about updates mucking with it but that’s not working for me.
2. I’d still like it to go to another page for styling and formatting reasons (and there are other things like a “Return to Directory” link on the page) but your
home_url('/v2-amr-members-detail/')line doesn’t work as it should.Can ya help?
THANKS
a) if you point to list 1, then it’s going to show list 1. It shouldn’t make any difference so long as the lists exists and are PUBLIC – see settings.
1. of course you don’t want updates to mess with it, but shouldn’t need to change it. Without any info on what you mean by ‘doesn’t work’ I cannot help.
2. home_url(‘/v2-amr-members-detail/’) line must obviously have the URL of the page that you want it to go to. In this case the page would have to be ‘v2-amr-members-detail’ if you expecting that to work. If you want it to link to this page http://thaihealingalliance.com/v2-therapist-search/ then you’d do
home_url(‘/v2-therapist-search/’)Sorry for not being clear.
1. The only way I could get this to work was to change the code in the AMR Plus file amr-users-plus-linktypes.php. I’d like to use this code in the THEME functions.php but it doesn’t work when I do that.
2. Adding
home_url('/v2-amr-members-detail/')throws a PHP error. That’s the problem. Here’s the code I’m using which is from the plugin’s linktypes file mentioned above with the List number changed. Addinghome_url('/v2-amr-members-detail/')causes an error. Can you show me where it should go? And how it can be a function in the THEME functions.php file? THANKSfunction amr_add_a_detail_link_type_function ( $linktype, $u, $field ) {// the current value and the user data and the field the link is on ) $url = add_query_arg(array ( 'filter'=>'1', /* can use anything to trigger filter, eg: "show" to still show the filter field, "hide" to hide it ONLY if it is a displayed field, else any value eg: "1" */ 'ID' => $u->ID, 'ulist' => 1, //admin side - Was 2 'list' => 1 // front end - Was 2 ) ); return ($url); } /* --------------------------------------------------------------------------------*/ function amr_add_a_detail_link_type ($linktypes) { $linktypes['detailpagelist2'] = __('detail page using list 1', 'amr_users'); return ($linktypes); }and the php error is ? it’s usually helpful to read them and figure out what it is telling you.
and do you still have the last about 10 lines of code from the example file where the filters are added ? Those functions arent going to do anything unless they are called somehow.
I got this sorted out by adapating your plugin code and using it as a plugin. I was trying to use it as a function for better personal housekeeping, but since it wasn’t working I just stuck with it as a plugin.
THANKS!
The topic ‘No "Detail page using list 2"’ is closed to new replies.