Giter VIP home page Giter VIP logo

Comments (11)

james2doyle avatar james2doyle commented on May 19, 2024

You already can do this.

https://github.com/PhileCMS/Phile/blob/master/lib/Phile/Repository/Page.php#L98

You can do $config['pages_order_by'] = "meta:position";. Just make sure you get the $config['pages_order'] correct.

from phile.

kursusHC avatar kursusHC commented on May 19, 2024

Alright Phile always surprises me !

The comment in default_config.php is out of date :
// Order pages by "title" (alpha) or "date"

Thanks

from phile.

james2doyle avatar james2doyle commented on May 19, 2024

Did you test it to make sure it worked?

from phile.

kursusHC avatar kursusHC commented on May 19, 2024

It works provided the value is different on each page. If you specify "meta: 1" on at least two pages, the first page is displayed and the others are stripped.

from phile.

james2doyle avatar james2doyle commented on May 19, 2024

Ok. I need to add the documentation on that.

from phile.

kursusHC avatar kursusHC commented on May 19, 2024

Thanks, the next awesome thing would be to change this "on the fly" in the template. ( if you don't tell me it's already possible:)

from phile.

james2doyle avatar james2doyle commented on May 19, 2024

"on the fly" in the template

Im not sure what you mean

from phile.

kursusHC avatar kursusHC commented on May 19, 2024

Access this param inside the template, so you can order :

  • blog posts with date
  • menu items with meta:position
  • some other content with meta:anothermeta
    etc.

from phile.

kursusHC avatar kursusHC commented on May 19, 2024

I took a look at the code (and apache log) and it appears that "date" is deprecated; when set it is internally replaced with meta:date.

This makes the duplicate bug above more problematic : in order_by_date mode, if more than one page have the same date, only one is displayed. Should I open an issue ?

from phile.

Frodox avatar Frodox commented on May 19, 2024

I took a look at the code (and apache log) and it appears that "date" is deprecated; when set it is internally replaced with meta:date.

Yup, I have also noticed that, here
@james2doyle said:

Yeah that needs to be added to the documentation too. We would also need to change all the default .md files. Something for the backlog.

=)

from phile.

kursusHC avatar kursusHC commented on May 19, 2024

Yep even though the "error" isn't really one on itself (it's just a message starting with the string "Error"), the duplicates disappearance looks like a severe (and silent) bug.

from phile.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.