site documentation
Posted in
5257
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
183
This Month
893
This Year
1556
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
alpine js apps c css factorio font awesome images linux quick modals sqlite site bugs site updates slick slider sliders testing windows apps apache api apps asp bat bootstrap bootstrap templates charts cookies core css css filters css grid design elements docker domains emoji fancybox fonts foundation framework gimp git html icons ideas image formatting images javascript javascript functions jquery js linux mac misc modals mysql nginx node php php errors php function php functions php simple html dom pi400 python react regex sections simple_html_dom simplepie php site bugs site documentation slick slider sql sqlite ssh sublime svg svg css templates tools virtual box vscode vue webdev windows windows 11 windows commands wordpress