0
Welcome Guest! Login
0 items Join Now

How to get page title in particles?

    • Michael's Avatar
    • Michael
    • Newbie
    • Posts: 14
    • Thanks: 0

    How to get page title in particles?

    Posted 5 years 6 months ago
    • I'm trying to create a universal template outline for my site and have a really cool top section I like the design of and want to put the page title and subtitle created in the article editor.

      I'm not sure how to do this, is there a twig or shortcode of some kind that I can use to insert the current page title or other variables?
    • Damir's Avatar
    • Damir
    • Preeminent Rocketeer
    • Posts: 22450
    • Thanks: 2679
    • Web Developer

    Re: How to get page title in particles?

    Posted 5 years 6 months ago
    • Michael's Avatar
    • Michael
    • Newbie
    • Posts: 14
    • Thanks: 0

    Re: How to get page title in particles?

    Posted 5 years 6 months ago
    • No, I don't think I know how to make a particle, or what would go in it.
    • Last Edit: 5 years 6 months ago by Michael.
    • Damir's Avatar
    • Damir
    • Preeminent Rocketeer
    • Posts: 22450
    • Thanks: 2679
    • Web Developer

    Re: How to get page title in particles?

    Posted 5 years 6 months ago
    • Michael's Avatar
    • Michael
    • Newbie
    • Posts: 14
    • Thanks: 0

    Re: How to get page title in particles?

    Posted 5 years 6 months ago
    • Yes I want to show the article title inside a particle on a gantry outline. And yes Joomla.
    • Damir's Avatar
    • Damir
    • Preeminent Rocketeer
    • Posts: 22450
    • Thanks: 2679
    • Web Developer
    • Michael's Avatar
    • Michael
    • Newbie
    • Posts: 14
    • Thanks: 0

    Re: How to get page title in particles?

    Posted 5 years 6 months ago
    • Is there also a way to insert this into particles like simple content particles instead of having to use it in Custom HTML?

      And is there a way to use shorter twigs like {{article_title}} instead of having to use all this:

      {% set request = gantry.request.request %}
      {% if request == 'com_content' and request == 'article' and request %}

      {% set article = joomla.finder('content').id([request]).language().find()|first %}
      <h1>{{ article.title }}</h1>

      {% endif %}
    • Last Edit: 5 years 6 months ago by Michael.
    • Damir's Avatar
    • Damir
    • Preeminent Rocketeer
    • Posts: 22450
    • Thanks: 2679
    • Web Developer

    Re: How to get page title in particles?

    Posted 5 years 6 months ago
    • Michael's Avatar
    • Michael
    • Newbie
    • Posts: 14
    • Thanks: 0

    Re: How to get page title in particles?

    Posted 5 years 6 months ago
    • Ok, I'm not sure what I need to do. I'd really just like to be able to do this:

      This image is hidden for guests.
      Please log in or register to see it.


      As this particle has all the styling I need and want, instead of me having to add a custom HTML
    • Damir's Avatar
    • Damir
    • Preeminent Rocketeer
    • Posts: 22450
    • Thanks: 2679
    • Web Developer

    Re: How to get page title in particles?

    Posted 5 years 6 months ago
    • Please post your URL, Username and Password in Secure Tab and i will take a look and maybe figure out what the problem is.

      FTP info with Username and password is also necessary ...

      For posting sensitive information you hit the Blue Reply Button and then you will see Secure Tab. Post all info that is sensitive in there, only Fellow Mods, Staff and I can see that!
    • Available for CUSTOM WORK with Joomla, WordPress and Grav Templates and Gantry Framework!

Time to create page: 0.054 seconds