ElkArte Community

Project Support => Support => Topic started by: CrimeS on December 14, 2015, 04:36:33 pm

Title: Track a function call
Post by: CrimeS on December 14, 2015, 04:36:33 pm
Can someone point me to the place where the following function is defined? template_pagesection(). I would like to make my own variations of it, or check the documentation for parameters, as probably it has what I need by default.
Title: Re: Track a function call
Post by: Spuds on December 14, 2015, 04:56:01 pm
It should be in the base index.template.php file
Title: Re: Track a function call
Post by: CrimeS on December 14, 2015, 05:08:07 pm
Ah, here it is. I didn't think that it would be in the index. Thanks.
Title: Re: Track a function call
Post by: emanuele on December 14, 2015, 05:27:36 pm
Would it be a pain to add template function to the API documentation? O:-)
Title: Re: Track a function call
Post by: Spuds on December 14, 2015, 05:37:54 pm
Should be "easy" to add ... A few things should be done in 1.1, like adding @ package tags of some form, either to the base feature or maybe just package template ... I know these are not strictly, or even loosely, package items, it just helps index the api docs for us.
Title: Re: Track a function call
Post by: CrimeS on December 14, 2015, 06:31:40 pm
Actually, there's one more thing that's associated with that function. Is there an easy way to remove "Next" links beside the numbers?
display: none would be sufficient only if the entire li element was marked as a next_page
Title: Re: Track a function call
Post by: Spuds on December 14, 2015, 07:12:04 pm
I think you can look at the top of the index.template file and find the 'page_index_template' => array( section ... and from there edit those areas ... I think
Title: Re: Track a function call
Post by: CrimeS on December 15, 2015, 04:44:56 am
I'm not sure how to "bite" this. If I remove next_page from the array, the li element will be still there taking up the space. Removing totally li's will take away the styling.

Is there any place where I can specifically remove the whole generation process of the next_page? I don't really need them at all.
Title: Re: Track a function call
Post by: emanuele on December 15, 2015, 08:12:43 am
Code: [Select]
.next_page, .previous_page {
    display: none;
}
Could be an option? O:-)
Title: Re: Track a function call
Post by: CrimeS on December 15, 2015, 08:21:07 am
I thought of that, but I'm styling the li elements, so after hiding the above classes, the li stays there, which leads to the attached image. It would all be good if it wouldn't inherit from the base_link.

If I could tag the li element that holds the next_page and previous_page, I could hide the whole li.
Title: Re: Track a function call
Post by: CrimeS on December 16, 2015, 10:43:24 am
After thinking about the solution, it could be a good idea to see where these button's are generated, so they don't inherit from base_link. Otherwise, it would need to stay as it is :/ I woldn't want to use JS to select parent element of any .next_page.