1

Using Display Suite (DS), I've overridden the user profile page in order to create a custom layout. However, the edit tabs that would normally appear when a user is logged in are no longer visible. How can I add them back?

I'm not sure if it's a factor, but I'm also using a custom-made Panels template within DS. Since I'm only using this layout on the user profile, I'm open to adding the edit tabs directly to the template, if possible.

I'm open to any methods that would be considered "best practice". Thanks in advance!

1

Further answers are welcome, however, I eventually found an easy solution to this issue. Because Display Suite supports tokens, I was able to create a custom field that outputted an edit button. Here's an example of the html I used: <a href="[user:edit-url]"><i>CUSTOM ICON</i></a>.

In order to hide this icon from unauthenticated users, I enabled field permissions which is available when the Display Suite Extras module is enabled. Once enabled, you can adjust what fields are displayed for each user role in the permissions menu. Hopefully this is helpful to anyone experiencing a similar issue.

  • I appreciate your effort of finding the working solution for that tab. But can you see, you used, 2-3 extra module just to achieve that one tab. It is always advisable to keep as less module as possible when working with Drupal. I am sure that there is some little thing, which is hiding that tab. I would suggest you to put some more effort to find that. I would suggest get rid of Custome Panels tamplate and just use DS moduel for layout. – CodeNext Aug 3 '16 at 16:22
  • @CodeNext I certainly understand your perspective, and I agree, less modules is always better. Initially, I planned on only using panels. Much of the website is built with Panels. However, I then discovered that Panels did not allow search result customization, which forced me to go with DS. On the user profile page, the Panels module is not being used, I'm only utilizing a Panels template, which is essentially the same as using a DS template. Hopefully this means that the bootstrap process time will not be negatively effected. Nevertheless, we will run extensive testing on this on load times. – Kellen Aug 3 '16 at 17:40
0

I do not know, how you are overriding. Hence suppose for trial, I want to divide the layout in Left and right and, put some fields in right and some in left side. And moreover, the Number of article authored by the user, which you had created using views as a block in your previous question. That view block I added using DS(Add block field) in right-bottom. I did all things using Manage display tab which is being added by default on each node by DS.

Now, this all I did using DS and on User page. I am posting screen-shop of that. I have every setting tabs as it was previously including Edit tab. I do not see any interference by DS. Could you please explain your method? I do not think you need anything else, you can set layout using only DS.

enter image description here

  • In order to better explain my process, I've added to my original post. I've attached screenshots to give you a better idea of my current setup. – Kellen Aug 2 '16 at 15:13
  • I am not able to understand from these information. I can just guess here. Since you are using the custom-made panel template, those templates overriding the original user page and not outputting those sections. I would suggest, to check by disabling those template for a while, and check whether those tabs are appearing or not! – CodeNext Aug 2 '16 at 16:41
  • Is there a way to print the tabs in my custom template? For example: <?php print $tabs ?>. – Kellen Aug 2 '16 at 17:21
  • Might be there is a way, but I do not have idea, If i will I will let you know. But, that is the Plan B and not proper way of doing this. I would say, you simplify your settings. The Display suite and Panels are synonymous modules, I think whatever panel can do, So can DS. Hence I would suggest you use only one module and simplify. If you have unavoidable restriction, then it is a other case. – CodeNext Aug 2 '16 at 17:52
  • 1
    DS and Panels can accomplish many of the same things, however, DS can do certain things that Panels cannot. An example of this is editing a search results page. The ability to create custom displays is also a great feature. The solution ended up being simpler than expected. I'll post my solution below, but I appreciate your time! – Kellen Aug 3 '16 at 15:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.