[Resolved] header element conditional page

Home Forums Support [Resolved] header element conditional page

Home Forums Support header element conditional page

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #885143
    Sebastien

    Hi,

    I use a header element that display some content.
    I would like the content differs depending of the active page (differ if Home or if Article or if blog or by name of the page) (without using “Display Rules” windows)

    Can you help?

    thanks

    #885291
    David
    Staff
    Customer Support

    Hi there,

    how will you be adding the different content to each of the different pages?

    #885292
    Sebastien

    at the moment, the header element has content <h1>{{page_title}}</h1>
    I would like use another header tag (h1 h2 …) depending of the type of active page:

    * if the active page is front end: <h1>{{page_title}}</h1>
    * if the active page is blog: <h1>News</h1>
    * if the active page is any Archive page: <span>News</span>
    * if the active page’s name is “testpage”: <span>hahahhaahahah</span>

    #885298
    David
    Staff
    Customer Support

    Personally i would just create the 4 separate header elements.
    Otherwise you’re into writing some PHP conditional logic script which won’t be as easy to maintain or make changes to.

    #885299
    Sebastien

    ok thanks !! 😀

    #885307
    David
    Staff
    Customer Support

    You’re welcome

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.