Exemple #1
0
def common_settings(request, slug):
    # general values - entity, request, template
    entity = Entity.objects.get(slug=slug) or default_entity
    request.current_page = entity.get_website() # for the menu, so it knows where we are
    context = RequestContext(request)
    instance = NewsAndEventsPlugin()
    instance.limit_to = MAIN_NEWS_EVENTS_PAGE_LIST_LENGTH
    instance.default_limit = MAIN_NEWS_EVENTS_PAGE_LIST_LENGTH
    instance.order_by = "importance/date"
    instance.entity = entity
    instance.heading_level = IN_BODY_HEADING_LEVEL
    instance.display = "news-and-events"
    instance.format = "details image"
    instance.layout = layout
    instance.view = "current"
    return instance, context, entity
Exemple #2
0
def common_settings(request, slug = default_entity.slug):
    # general values - entity, request, template
    entity = Entity.objects.get(slug=slug)
    # request.current_page = entity.get_website() # for the menu, so it knows where we are
    request.current_page = default_entity.get_website()
    context = RequestContext(request)
    instance = NewsAndEventsPlugin()
    instance.limit_to = news_and_events_list_default_limit
    instance.default_limit = news_and_events_list_default_limit
    instance.order_by = "importance/date"
    instance.entity = entity
    instance.heading_level = h_main_body
    instance.display = "news-and-events"
    instance.format = "details"
    instance.layout = "sidebyside"
    instance.view = "current"
    return instance, context, entity