I figured out why it was coming up with that error; although the weblog options let you assign multiple categories to each weblog by cntrl-clicking in the select list, the pages modules seems to get confused by this. If I deselect all but one category, and make sure that category has subcategories, the pages module works.
Also, categories which don’t have any children do not show up in the publish > categories screen.
What this means in practice (as I currently understand it) is that I cannot have my shorter urls as described in my previous post.
Why? Because the pages module only lets you select one weblog, and the weblogs only allow you to select one category (and that category must have subcategories) - if you try to select multiple categories or categories without children, the pages mod doesn’t work, nor do the childless categories show up in the publish screen.
This means that I have to create both my ‘donate’ and ‘about’ categories under another category, e.g. ‘info’, and thus I get my longer url: http://www.mysite.com/index.php/info/about
If I am misunderstanding something, please let me know, thank you.
Is there an easy way to use pagination with Pages? I need to use pagination on a variety of pages (Pages pages :D), but because the Pages url doesn’t use the typical template/weblog structure the pagination links go nowhere.
@The Pie Man: I’ve had the problem also, and am not sure of a fix for the pagination issue. I’ve gotten around it by using physical templates where pagination is needed. For example if I had a static page at /blog/archive, i would create a template group “blog” and template “archive”. Then instead of using the Pages template you will see the physical template. The only difference here is that you’ll have to hardcode the category ID into the {exp:weblog:entries /}
@mediagirl: see my above response first. the default functionality of the extension is to show any physical templates first so if a template named archive exists within a group named blog you’ll see that actual template. not the one defined on the configure tab. If, however, you check override template, you’ll always see the template defined in the configure tab, over any physical templates.
Fixing your search results —————————————————————————————
The links to your static pages on the search results page will break, you’ll need to wrap the following code around your search results template:
But now I have a question. I have looked through this thread, and I may have missed this, but I’m unclear how the search function is actually working. I am doing a site for a drug rehab centre and have used this excellent module to build the site off. It’s working great until I get to the search bit. The words drug, rehabilitation and addiction occur on numerous pages, but searching on any of those words will only bring up a result if there is a page named with the search word. There is a page called ‘rehabilitation’, so a search on ‘rehabilitation’ only pulls up a link to that page.
It seems like the search function is only looking at the category structure - is that correct, or have I just set something up wrong here? Or do I need to use an external search function like Atomz. I suspect that it’s an error on my part somewhere, but I can’t see it for the life of me.
It’s actually defined per field so under Admin » Weblog Admin » Custom Fields you’ll want to set “Is this field searchable?” to “Yes”. Do that for your static body field your search should then function as you expect.
I have now got it working, and it was my error. I had turned on the searchable field when I set up the custom fields, but I hadn’t specified in my search form where to look. As soon as I put “search_in=“entries” it all started to work. I thought it was probably something I hadn’t done, and so it was - thanks for your help guys.
BTW David - I ended up on your site from another thread when I was looking into the gallery module - very nice indeed!
I think I have made a mistake somewhere along the line. One of my categories is ‘About Us’, and as you can see from the attached image I have not made it dynamic. Whenever I click on ‘About Us’ in the actual content tree it takes me to a new entry, instead of allowing me to edit the initial About Us entry.
That shouldn’t be happening should it? If they are not dynamic does it not take you to an edit screen to edit that entry? The About Us weblog isn’t the default weblog, but one selected from the dropdown box in your content pages configuration. does that make a difference?
I am really confused as I thought I had it working correctly. I had been so focused on getting the dynamic part of the static pages working (quite ironic), that I hadn’t checked the static side. Any advice is appreciated
@Gizmo: the current implementation of the custom weblog drop down converts the category to dynamic. Is there a reason you need a new weblog for each category? I’d try using the same weblog for all your static pages, it will standardize the fields across the board. That said, I realize there are reasons to use different weblogs, and hope to allow “static custom weblogs” in a future version.
@annca: the category=”\d+” should be a number, not the name of the category. If you’re hardcoding the categories, just switch about to “5”. Or if you’re using a static page template switch about to “{static_page}”