Jump to content

Pages Category Images / Pages Searchable Text Fields

Recommended Posts

  • 2 weeks later...
  • 2 weeks later...
  • 3 months later...

Sorry guys, Summer got away from me. There's not really any meaningful screenshots available. The mod just adds in a place where you can add an image to a category. You then can call/use that image whenever you have the category available in a Pages DB template (either category view or record view). What you do with it is up to you.

That said, I do have some walkthrough-ish stuff written down and I'll add that in here soon. Otherwise, really, the mod description you can read in the Marketplace lays it out pretty much as is.

Version 2 is incoming. Moves away from simple plugin hack to full application adding a proper file handler. If you already have the plugin, installing the new v2 app will take care of preserving your files and uninstalling the plugin - no need for you to do anything other than install the app.

Link to comment

Pages Category Images Version 2 now uploaded. If you have the plugin installed DO NOT UNINSTALL IT! The application install routine will check for the plugin, take over the files from it, and then gracefully uninstall it. If you uninstall the plugin manually beforehand you'll be deleting all of your images and I really won't be able to help you with that...

There's room here if you guys want an icon image field or an array of images for a slider tacked on to this. Just let me know. Mind you, I've got to move on to other work right now but can easily circle back sooner rather than later.

Edited by All Astronauts
Link to comment
  • 4 months later...

A tip for people using Pages Category Images and getting broken images.

When I started using it, $category->pcimage and {file="$category->pcimage"} were producing full URLs but <img src='{file="$category->pcimage"}'> was only stopping at my Amazon S3 bucket; it didn't contain the full URL with the filename and extension. When I pasted the full URL into my browser, I got an error message.

The reason is because URLs were being created to my Amazon S3 account, which is where I store my Pages media. Pages Category Images has its own setting in  System > Overview > Files > click Storage Settings, which by default is set to file system, using the server where the suite is installed. This means that my category images were being uploaded to a place on my server whilst the system was looking for them on my S3 account alongside the other Pages media.

I solved the problem by changing the storage method of Pages Category Images to S3 and within seconds the images were displaying.

Link to comment
  • 4 weeks later...
  • 3 weeks later...
  • 1 month later...

What's the chances of the image uploaded being clickable, to access the database that it has been upload too? At the moment it's a static image with no interaction to the user, who would expect on both mobile/tablet & PC to be able to click this to access the DB.

Great app btw, linkable image would be fantastic addition.

Link to comment
  • 2 weeks later...

Can it not be done automatically? So that whatever databAse you're in clicking the image for the category does aexactly what the article image does? Unless I'm not seeing it, you can't wrap the image in a <href="link"> as it's an image upload into that category?

That would require doing this for every single category & if you update/change the image, you then need to go and change the link etc and where exactly would all these image links need to be added?

Article images are clickable and take you into the article by default but the category image plugin doesn't take you into the category with the articles submitted.



Edited by craigf136
Link to comment

We'll use the default provided Pages Articles db as an example.

When you just jump in to Articles from the front end, it loads up the index template under Category Index. That template shows some database info (title, etc.) and then iterates through all the top level categories, calling the categoryRow template each time and throwing the category variable into it. Let's look at the code and display for the category link here:


gives you this:


There's your category and your link. But you want to use an image here. And you can, because you have the $category variable available here.

So, firstly, let's just stick the image in here, I'll hard code in some style calls so we don't blow out the row too much.



Note that I stuck INSIDE that a href call. That image is clickable and when clicked on goes to the category. Honestly, the provided templates for all this stuff are just basic things that follow IPS style guidelines. You can do ANYTHING you want with this stuff. You can ditch the IPS row structure and instead make it all thumbnails if you like - I won't go that far but lets me take a minute here and...



There, now the category image is used as the background for div, the category title is inside that div, and the entire thing is clickable. Starting with this, you can ditch the rows, go with flex boxes or the ipsGrid calls and make your category pages nothing but large squares with the category images as the backgrounds and on and on and on. 

Unless I'm way missing something here....

Edited by All Astronauts
Link to comment

Thank you. What I’m trying to say is, that the pages category images app in my view, should be doing that by default? by making the href call without having to do edits? Rather than just adding a static image?

I’m not a coder but I can certainly hack what I need to be done and thank you for the info above but it would be far better suited to being default with the app (if possible)?

Edited by craigf136
Link to comment
2 hours ago, craigf136 said:

What I’m trying to say is, that the pages category images app in my view, should be doing that by default?

How could it? Producing that output relies on script being added to Pages template sets. How is the plugin supposed to know where and in which template sets to add the relevant call? Even if it's done by guesswork, what then when users decide that they didn't want it to be used in that way, that their font doesn't suit the image etc?

I don't think anything unreasonable is being asked here. The plugin makes it possible for users to easily add an image whereever they choose within their Pages databases. They still need to add the relevant code. It's a tool to facilitate customisation. The end user still has to make the changes they desire, it's just a lot easier with this plugin than it was before.

Link to comment

Yeah, there's really no sane way forward here for what you want. Even if I targeted the default category templates you run into the problem of people not wanting it there in that way, what happens when people start editing the default templates, hook points disappearing. It's really a nightmare. 

Link to comment
  • 6 months later...
  • 4 weeks later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...