Details Sidebar Content Elsewhere?

This topic contains 4 replies, has 3 voices, and was last updated by  Paolo 9 years, 10 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #27015

    Dave C
    Expired Member
    Post count: 5

    I’ve through the forums found a way to sort my details sidebar. Problem is, I want the details page to show 100% width, which I have fine, but I have to take out the sidebar to make it happen. I was going to create an area above the slideshow, or inside one of the custom tabs to display the content from the details sidebar. Looking through the Actions file I can’t seem to find a place to start to accomplish this. Any ideas?

    #27016

    Simone
    Expired Member
    Post count: 3515

    You can create a fieldset and set it as a tab (clicking on Show as a tab on detail page), and below it you can add your custom fields, so they will go in under the tab (fieldset) you just created.

    #27190

    Paolo
    Site Admin
    Post count: 31206

    Just FYI, you can also programatically create new tabs and add content into it.

    
    
    add_filter('geodir_detail_page_tab_list_extend', 'geodir_detail_page_tab_list_extend') ;
    
    function geodir_detail_page_tab_list_extend($tab_array)
    {
     	$tab_array['my_new_tab'] = array( 
    										'heading_text' =>  __('New Tab',GEODIRECTORY_TEXTDOMAIN),
    										'is_active_tab' => false,
    										'is_display' =>  apply_filters('geodir_detail_page_tab_is_display', true, 'my_new_tab'),
    										'tab_content' => ''
    									);
    	return $tab_array ;
    }

    Now for the second part, to show Content when user click on that tab, do this:

    
    
    add_action('geodir_after_tab_content' ,'geodir_my_new_tab_content');
    function geodir_my_new_tab_content($tab_index)
    {
    	if($tab_index =='my_new_tab')
    	{
    		echo "Hello world!!";
    	}
    }

    Please make sure that ‘my_new_tab’(tab index) is the same as the array index created in the first step.

    Thanks and let us know how you went.

    #27195

    Dave C
    Expired Member
    Post count: 5

    Hi – I have a few custom tabs setup from when I first evaluated this software in August (1.2?), which are working fine. I can create the tabs fine, but what I was hoping was to move the “Details Sidebar” into one of the tabs itself.

    In listing-detail.php it makes reference to ‘ do_action(‘geodir_detail_sidebar’);’

    I’ve applied a filter and sorted the content, and also eliminating the share this button along with the google analytics in the array. What I was hoping is that I would stuff that information (geodir_detail_submitted_bu_custom, geodir_edit_post_link) somehow in another spot, was hoping for a tab, or just being able to grab each seperate set of details and put it somewhere else on the screen..

    Say for example – Page Title – Submitted by (geodir_detail_submitted_by_custom) along with the _review_rating followed by in another section of the page or a tab the _edit_post_link and so on.
    Sorry if I haven’t been clear. I’m fudging along at this trying to see if I can make it what I want it to do and then going to spring for a few of the addons – ie multi locations and such for this freebie site I want to give back to the bicyclist community (I have been riding my bicycle around the world 7 years now, and want to give back an opportunity for users to see all the free campsites there are in the world to get a shower at the end of the day) 🙂

    #27197

    Paolo
    Site Admin
    Post count: 31206

    Have you tried echoing these functions directly inside the new tabs content?
    Example:

    
    
    add_action('geodir_after_tab_content' ,'geodir_my_new_tab_content');
    function geodir_my_new_tab_content($tab_index)
    {
    	if($tab_index =='my_new_tab')
    	{
    		echo geodir_edit_post_link();
    	}
    }

    I’m 99% sure that’s what you need to do…

    Let me know.

    Thx

Viewing 5 posts - 1 through 5 (of 5 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount