Search

A new Extension, “Pages Field” is now available for download. Comments and feedback can be left here but if you discover any issues, please post it on the issue tracker.

Similar to the normal Select box field, however instead it is populated only by pages in the system.

Requires Symphony Beta Revision 5

Download

Grab the latest version from the git repository or one of the older versions below if required.

Changes

1.2

  • Publish select box will use page ID's instead of handles. This solves problem where 2 pages share the same handle, but only one shows up due to the clash. This update effects just the publish form select box. It does not change how data is stored internally and is 100% compatible with previous versions.

1.1

  • Fixed sorting problem

Cool!

Alistair, this is a great idea!

I have seen that the field outputs the page name, handle and id in the XML. Page IDs are especially interesting, because page names or handles need not be unique is Symphony 2. Do you have an idea how filtering datasources by page IDs could be achieved?

Thanks Alistair. This is great.

I'm not sure if this is a bug or if I'm trying to defy natural laws -

  • when you select this field as your 'Sort By' selection within a Data Source it returns no entries (i.e. No Records Found) as if the field were empty, but works fine if you sort by something else like the entry System ID.

Is this how it's supposed to work?

Best. Clayton

It should be working. Did you add the field to an existing section that contained entries?

Did you add the field to an existing section that contained entries?

Yep. Have you experienced the same behavior?

Well, the problem is that you are trying to sort by data that doesn't exist. It's a known limitation, and currently the only way around it is to save all your entries again.

The solution, in Rev6, will be to automatically populate all entries with default data when adding a new field.

Well, the problem is that you are trying to sort by data that doesn't exist. It's a known limitation, and currently the only way around it is to save all your entries again.

Hmm... What's odd is that I did reopen each entry and declare a setting within the new Page field (and resave). Even with this, upon sorting by the new Page field it caused the 'No Records Found' DS return.

Is this what you mean?

okay then, that is likely a bug. ;) Ill check into it.

I am not having any problems so long as I re-save entries. Is this online someplace?

I'll try to recreate it and post back. Thanks for checking it out.

Hi Alistair,

Here's what happening in my little corner of the orchestra. I've added similar data to entries as both a dynamic 'Page Select Box' (per this extension) and as a static, normal, select box.

When I set the DS to sort by the normal select box I receive the same data set as sorting by something like 'System ID'. When I sort by a 'Page Select Box' I receive the 'No Records Found' error. This is after opening all of the related entires and specifically declaring a value in the 'Page Select Box' field.

It's not an huge issue to be able to sort by page in this case, but I wasn't sure if this was an indicator of anything else more nefarious going on ;)

I've set up a login in case you have any interest in looking under the hood. I'll send the login details to the Overture 'team' address. If it doesn't seem necessary, just let me know and I can delete the author account.

Thanks again Alistair, Clayton

It's not an huge issue to be able to sort by page in this case, but I wasn't sure if this was an indicator of anything else more nefarious going on ;)

I just cannot seem to reproduce this bug! Strange. I don't think it points at any larger problem. Sounds like the SQL might be off under certain situations. Ill keep an eye on it, but if it's not causing problems for you right now (sorting by page) then I might put it on the back burner as I have my hands full with Symphony 2 Rev 6. ;)

Thanks for looking into it.

I might put it on the back burner as I have my hands full with Symphony 2 Rev 6. ;)

Please do - full steam ahead on Rev 6 awesomeness.

I have posted an update that should fix the sorting issue.

Posted link to Git repository, containing v1.2

Alistair — this has fixed the problem in the backend, but querying the DS by $current-page obviously has the same problem, since $current-page is just the handle.

Now S2.0 has the $current-page-id param can we use this in the query instead?

Alistair, there are still two open bugs on GitHub for this extension. Will you find the time to care for these (or should somebody else fork the extension and try and find a solution)?

Issue #1 is easily fixed. Line #83, the SQL query needs to include handle in the select.

Issue #2 I’m not as sure, but I think Rowan has fixed this in the past..

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details