site documentation
Posted in
8
6:18 am, June 9, 2021
Latest from Code Widget
What generates the Latest from Code Widget?
Code
PHP
$widget_latest_list = $class->list_all(
$start = 0,
$max = 10,
$list_type = "latest",
$template_file = "core-list-item-compact.html",
$search_term = ""
);
$class_nice_name = $class->nice_name;
if($widget_latest_list > "") { // add this to a card
$widget_card = new template("card-title.html");
$widget_card->set("title", "Latest from $class_nice_name");
$widget_card->set("content", "<div class='list-group'>" . $widget_latest_list . "</div>");
$widgets->add($widget_card->output());
}
Template File(s)
core-list-item-compact.html
card-title.html
HTML
<a href="/view/[@class_name]/[@uid]/[@title_uid]/" class="list-group-item list-group-item-action text-truncate" title="[@title_escaped]" data-toggle="tooltip"><span class="badge bg-info text-dark"> Posted in
</span> [@title_escaped]</a>
x
View Statistics
This Week
32
This Month
226
This Year
0
Add Comment
Other Items in site documentation
function to load one latest item with a start val load_latest_single_num
make the view number zoom when mouse over or active
moving the hits widget into the post header and footer
for auto filled fields, need to change the text and background colours
use a list group for listing by category page [todo]
Comments Listing should be a custom list rather than using search
load the latest single item only
load oldest item based on insdate then update the insdate to now - load_latest_single_update
change this to a list group - other items
hero widget header - creates a nice looking hero item from a target uid and class
dropdown section
Latest from Code Widget
Related Search Terms
Other Categories in Code
c testing apache apps asp bat bootstrap bootstrap templates core css css grid design elements fancybox fonts foundation framework gimp git html icons ideas images javascript jquery js linux mac nginx node php php functions php simple html dom pi400 python react sections site bugs site documentation sql sqlite sublime svg templates tools virtual box webdev windows wordpress