insert / remove tag in Uber List display

Permalink Browser Info Environment
Hi John,

I am trying to apply a specific function with Uber List, without much success. Unfortunateley the forum search does not seem to work properly, at least I dont get any results here. So maybe it is quickest to just ask you :)

What I want to build is a list of pages that toggles an <a> wrapper depending on either expiry date or place in the sitemap.

The usecase is:

For a event-hosting company, they would like to have a "archive" function of their events where past events are listed but no longer "active".

Each Event is a page under /events in the sitemap, there are four pagetypes for four specific event formats (event1, event2, event3, event4).

So it is easy to set up UberList to just display anything beneath /events. (and for autonav)

But could it be done to:

- display all pages of pagetypes event1-event4 (i think so)
- display them with <a>-tag wrapper when they are still beneath /events
- display them without <a> when they are in the trash or elsewhere?

Or:
- assign a "end date" attribute to each event and strip <a> when this date is in the past?

I don't believe that this can be done with permission expiry... could it?

So the goal is to present a complete list of all past events where only future events are linked...

That would be great :) Thanks for any adivce on that :)

Type: Pre-Sale
Status: Archived
Cahueya
View Replies:
JohntheFish replied on at Permalink Reply
JohntheFish
You can list multiple page types by a series of LIST_​ALL_​PAGES_​OF_​TYPE and then MERGE_​INTO a memory, repeating for each page type, then recall the memory to get the compound list. You can also do similar to list pages in different parts of the sitemap.

For the links (or not), the list item stack could:
1. do some tests to see if an event has elapsed or not and set an expired flag as a memory.
- For sitemap loacation This could be done by looking at ancestor pages LIST_ANCESTOR_PAGES and then LIST_CONTAINS.
- For date comparison, simply read the page date or event date attribute and compare to current date.

2. only wrap the event link with the <a> tag if the flag is not set.

The tests could be optimised by using BMD to set an attribute for any page with an expired event and testing that first,
JohntheFish replied on at Permalink Reply
JohntheFish
Another optimisation may be to run a Magic Job daily to scan through all events pages and add an expired attribute (boolean) to any event that has expired, using similar logic to the above.

The list item stack could then simply test the one attribute rather than repeating the more complex tests each time.
JohntheFish replied on at Permalink Reply
JohntheFish
Toggling a wrapper to link or just name a page, assuming the test results have been saved to the memory named "old_event_flag"

SET "old_event_flag" RECALL 
IF 
 ( UBER_LIST_ITEM PAGE_LINK ) 
 ( UBER_LIST_ITEM PAGE_NAME )

concrete5 Environment Information

# concrete5 Version
5.6.3.1

# concrete5 Packages
Address Vcard (1.0), Concrete Bricks Game (1.1.1), Concrete Paving Game (1.1.1), Dynamic Iframe (1.61), Easy Tables (2.0.1), eLearning Quiz (2.1), Expand / Collapse (1.2.6), Extended Form (2.6), Fancybox links (1.0), Flowplayer Free (1.2.1), Formidable (2.0.13), Formigo Cookies Disclosure (1.0), Google Plus One (1.0), Iframe (1.0), Lerteco Membership (2.1.5), Like Button (1.0), List files from set (1.0.2), Logging Error Pages (1.1), Login (1.1.1), Login Redirect (1.3), Long Story Short (1.0.3), Magic Data (2.9.8), Magic Data Symbols1 (2.7.6), Magic Data Templates1 (2.1), Mailing List (2.54), Major Marketing (2.0.4.5), MindNet Optimize MySQL database (1.11), Miser OptiMIZER (1.1.0), Next & Previous (1.02), Page Auto Redirect (2.0), Page password (1.1.4), Page Properties (1.0.1), Paypal Cart System Pro (1.0), Paypal Donations Box (1.0.1), PC5 Custom Templates (3.0), PHP block by ND (1.0), Picturefill Image (1.1), Piwik Iframe (0.9.6), Popup Login (1.0.5), Registrant Group (1.1), Search Block Templates (1.0), SEO Analyzer (1.2), Sisimizi's Download Folder (1.0), Social Icons Reloaded (1.3), Social Share Privacy (1.2.2), Sorcerer's Map (1.2), SQL Info (1.1), The Void theme (1.0), tnSpacer (1.2), Uber List (1.8), Who's Online (2.2), Zoom Image Dual (1.1).

# concrete5 Overrides
blocks/formidable, blocks/form, blocks/autonav, blocks/page_list, blocks/rss_displayer, blocks/next_previous, blocks/tony_mailinglist, elements/header_required.php, helpers/form, helpers/miser.php, helpers/miser_support, css/style.css, css/css, css/tabs.css, languages/de_DE, libraries/_view.php, single_pages/ORG_register (02.04.14 22:50).php, single_pages/register.php, single_pages/login.php, single_pages/page_not_found.php, single_pages/page_forbidden.php, themes/major_marketing

# concrete5 Cache Settings
Block Cache - On
Overrides Cache - On
Full Page Caching - On - If blocks on the particular page allow it.
Full Page Cache Lifetime - Only when manually removed or the cache is cleared.

# Server Software
Apache

# Server API
apache2handler

# PHP Version
5.3.3

# PHP Extensions
apache2handler, apc, bz2, calendar, Core, ctype, curl, date, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, imap, ionCube Loader, json, libxml, mbstring, mysql, mysqli, openssl, pcre, PDO, pdo_mysql, pdo_sqlite, Phar, Reflection, session, shmop, SimpleXML, sockets, SPL, sqlite3, standard, tokenizer, wddx, xml, xmlreader, xmlwriter, xsl, zip, zlib.

# PHP Settings
max_execution_time - 60
apc.max_file_size - 2M
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 2000
memory_limit - 1024M
post_max_size - 32M
safe_mode - Off
safe_mode_exec_dir - <i>no value</i>
safe_mode_gid - Off
safe_mode_include_dir - <i>no value</i>
sql.safe_mode - Off
upload_max_filesize - 128M
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 100000
pcre.recursion_limit - 100000
session.cache_limiter - nocache
session.gc_maxlifetime - 7200
safe_mode_allowed_env_vars - PHP_
safe_mode_protected_env_vars - LD_LIBRARY_PATH

Browser User-Agent String

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.