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 :)
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 |
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.
The list item stack could then simply test the one attribute rather than repeating the more complex tests each time.
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 )
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,