How can i change this part of member_main_resources.phtml, that a click on a resource open in new window?
You can edit file amember/application/default/models/ResourceAbstract.php find method renderLink and add target="_blank" to link code.
thank u - that works but finally also let the member links open in a new window. is it possible that only the member resources open in new window?
What do you mean member links? These changes should affect only resources. May be you can attach screenshot and highlight what is exact link open in new window besides resources after these changes.
Won't this get over written on updates ResourceAbstract.php Can't we override this function somewhere to prevent losing the changes?
Yeah, you are right. It is not good idea to alter core files because it will make upgrades difficult in future. Here is better solution for this case. This approach is upgrade proof. You need to put the following code to site.php file (http://www.amember.com/docs/Site.php_file): Code: Am_Di::getInstance()->hook->add(Am_Event::AFTER_RENDER, function(Am_Event_AfterRender $e){ if (preg_match('|blocks/member-main-resources\.phtml$|i', $e->getTemplateName())) { $e->replace('/(<a)/', '$1 target="_blank" '); } }); We improve aMember every day and I believe aMember is not just script but it is membership platform. aMember is very flexible and allow to change almost every aspect of software without touch any core file. It give you great power to customize your installation according your exact requirements but still have ability to take advantage from easy upgrades to upcoming versions.
csesar - that's a neat solution, but doesn't work if you check the box to hide the link on the Dashboard, and put it in a content category instead. I'd like the links listed on the resulting content category page to open in a new window. Is there an equally simple way to achieve that?
Here is code for resource category pages: PHP: Am_Di::getInstance()->hook->add(Am_Event::AFTER_RENDER, function(Am_Event_AfterRender $e){ if (preg_match('|member/category\.phtml|i', $e->getTemplateName())) { $e->replace('/(<a) (id="resource-link)/', '$1 target="_blank" $2'); }});