Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

How can I create dynamic navigation bars?

  • 25-05-2015 10:56pm
    #1
    Registered Users, Registered Users 2 Posts: 1,977 ✭✭✭


    It would need to load "most popular" stories etc. on the site into a navigation bar at the top. The most popular stories could change throughout the day....

    I've been searching around with google....


Comments

  • Registered Users, Registered Users 2 Posts: 11,989 ✭✭✭✭Giblet


    I would start with determining how a story is popular. Once you have that the rest will fall into place. Do you log stats on the stories or have any info about which ones are accessed. (Google Analytics, logging, access log/webserver logs etc)


  • Registered Users, Registered Users 2 Posts: 1,977 ✭✭✭euser1984


    Thanks for your reply Giblet....

    It seems to be using the statistics module on Drupal 7....I don't know how to use it though....I'll begin working on it with google I suppose....

    I've seen it used on another site in this way
    I've just found out that the below code is for google analytics...

    [HTML]<a href="http://www.***.com/categoryname&quot; class="analytics" data-category="Nav clicks" data-label="Trending Tags" data-value="Category name">Category name</a>[/HTML]

    I do have the amount of reads under each article......but; when I run a report to get stats it says I have none. I'll have a look at that reads element under inspector now actually to see if I can figure anything out.

    Update: the inspector for the element (on my site) is defined this way in the html...

    class="statistics_counter first last"


  • Registered Users, Registered Users 2 Posts: 4,946 ✭✭✭red_ice


    euser1984 wrote: »
    I do have the amount of reads under each article......but; when I run a report to get stats it says I have none. I'll have a look at that reads element under inspector now actually to see if I can figure anything out.

    I don't work with Drupal, however, if you have a list of 'reads' there must be a value stored in your database somewhere. Search for the post name / ID in the database, find the table that corresponds with the amount of 'reads'. This would more than likely be your most popular articles.

    I assume you could then query the top (n) articles and order by ascending to spit out your article title/url/id from the values used in your query.


Advertisement