musashi9 |
|
---|---|
Is there a plugin that shows a random page from the database with a link to it on the index page. I have over 1000 pages on my site and a nice little random link generator will work wonders.
|
Kort |
|
---|---|
Use it like: {PHP|pagelist('pagelist.sometpl','1','RAND()')} ... or add parameters to suit your needs SED.by - создание сайтов, разработка плагинов и тем для Котонти
|
musashi9 |
|
---|---|
Ah good stuff, can someone help me config it for my needs? I would like to show 5 random links from only 2 categories (I dont need pages from ...news,general, ect...) Is it also possible to only show the page ID name not all the folders before it (instead of General news > page-id=1) Just show page-id=1 Thanks |
Kort |
|
---|---|
Callback in the template: {PHP|pagelist('pagelist.random','5','RAND()', '', '', '', 'cat1;cat2')} Simple template (pagelist.random.tpl): <!-- BEGIN: MAIN --> <!-- BEGIN: PAGE_ROW --> {PAGE_ROW_ID} <!-- END: PAGE_ROW --> <!-- END: MAIN -->
SED.by - создание сайтов, разработка плагинов и тем для Котонти
|
musashi9 |
|
---|---|
Amazing thanks. How do I get it to show the 5 in a table/rows |
Kort |
|
---|---|
Easy: <!-- BEGIN: MAIN --> <table> <tbody> <!-- BEGIN: PAGE_ROW --> <tr><td>{PAGE_ROW_ID}</td></tr> <!-- END: PAGE_ROW --> </tbody> </table> <!-- END: MAIN -->
SED.by - создание сайтов, разработка плагинов и тем для Котонти
|