Dynamic Content: Wrong URL For Details Page - Question | JoomShaper

Dynamic Content: Wrong URL For Details Page

P

patin

SP Page Builder 1 month ago

I have a fully working dynamic content for bikeroutes that I blog. I made some pages with different filters for showing only the region I visited (Comtat Venaissin, Gorges de la Nesque, Luberon Pays de Sault en het Plateau d’Albion, Drôme-Les Baronnies, Alpes-Haute-Provence ...). (Selected from my dynamic content)

So i have a menu with ... https://carobike.be/fietsen-en-genieten/drome-les-baronnies https://carobike.be/fietsen-en-genieten/gorges-de-la-nesque https://carobike.be/fietsen-en-genieten/pays-de-sault-en-het-plateau-dalbion etc ...

In Sp Page builder I see type = /blog-routes on these pages

But when clicking the button in the overwiew page to open te detailspage, I always seem to have /gorges-de-la-nesque/ intruding in the URL of the detailspage. No mather what page I came from. example: https://carobike.be/fietsen-en-genieten/gorges-de-la-nesque/lourmarin-cucuron

It seems to be something coming from my /blog-routes:slug ... but I don't see any way to change this.

0
13 Answers
Toufiq
Toufiq
Accepted Answer
Senior Staff 1 month ago #219875

Hi there,

Dynamic Content does not support creating multiple pages for the same collection for both the index and details pages. In your case, the pages were created by duplicating them. That duplicate option should not have been available there, and that was our mistake.

If you need individual listing pages for different regions, you should use normal pages instead. After creating the index and details pages, those pages were added again to the menu, which is causing the conflict.

The issue happens because each Dynamic Content collection has its own slug. When that collection is connected to the listing and details pages, that slug becomes part of the URL. On the other hand, when you create menu items, Joomla also generates menu aliases. In your setup, the menu alias and the Dynamic Content slug are conflicting with each other, which is why the wrong URL structure appears.

Solution:

If you need individual listing pages, please use normal pages and load the required collection there based on your needs. Keep only one Index and Details page published, and unpublish the rest. Also unpublish the menu items that were created using those extra Index pages.

Note: Before applying these changes, please keep a full backup of your site or test the process on a staging site first.

Best regards,

Toufiqur Rahman

Team Lead, Tech Support (JoomShaper)

0
J
Jeanette
Accepted Answer
1 month ago #220223

Hi Toufiqur, I have struggled so much making this work, and i wish you had told me this long time ago. This is the discussion i have had with you before, and now i get a total different solution.

The project is already delivered, but seems i have to do this all over again :(
Can you confirm that the solution you have described above are the right way to solve my structure and get correct links (and with the search friendly urls set to yes) ? Please have a look at our previous discussion where i am told that static pages cannot be used to solve my structure, and trouble with urls: https://www.joomshaper.com/forum/question/43687

0
Toufiq
Toufiq
Accepted Answer
Senior Staff 1 month ago #220689

Already, Our team member is connected with you. I hope he will describe more details. If you need more details, Please let me know. Thanks

0
J
Jeanette
Accepted Answer
1 month ago #220230

To be totally clear, this is the structure i need:

  1. A "main" product level 1. 4 images (categories) listed on the frontpage

  2. A "category" page level 2. This is all the different products within the selected category at Level 1 (also the same as the menu items)

  3. A detailed explanation of the product Level 3. When clicking on a product at level 2, this is more details about the product.

The solution which is present now gives the wrong link when clicking a Level 2 product.

If you see this structure, can you please explain how i have to create the structure to make the solution work correctly and also be sure that it works with search friendlies url to yes. There was a linking bug in PB so that i was told to set search friendly url's to no. And this also was the reason for me creating this workaround solution copying the pages.

0
J
Jeanette
Accepted Answer
1 month ago #220300

Toufiqur, Did you have a look at this and have a suggestions for how to solve this based on the structure i need and seo to be ok?

0
P
patin
Accepted Answer
1 month ago #220305

Jeanette -> ik did like Toufiqur mentioned in his instruction: Made new pages and copied the collections + add-on from the wrong detailpage to the new one. When I relinked in menu (and made new uniqe aliasses), my links were right this time. Just kept one index and detailspage but all the other filtered collections were made from a normal pagebuilder page. With the copying working fine, I actually manage to fix it really fast.

0
J
Jeanette
Accepted Answer
1 month ago #220337

Hi Patin, Very glad to hear from you. And good to see i am not the only one who has bumped into this linking problem so to speak :)

So let me see if i understand you correct. Here is my structure today:

Level 1: My frontpage. On this page i have 4 images /categories This page has no collection. Each category links to a separate indexfile at level 2 by. New page are opened by linking to a menu item created for the selected category.

Level2: Listing all the different products within the selected category at Level 1 This page is an index file (created by copying another indexfile) This file has a collection and display/fetches info from collection A and B

Level3: Detailed information regarding a product. When clicking on a product at level 2, this page displays more information for the product. This is a slug page. The only slug i have and are used for every index page. This level fetches info from collection B (collection B has a connection field to A)

I see what you write, but i am not sure i completely understand how to go along.Do you mind commenting a bit more under the levels above what you did? Like what level becomes a "standard page"? (I started to make level 2 a standard page with a collection but got stuck for how to link it to the detail page.....)

0
P
patin
Accepted Answer
1 month ago #220342

I'll try to explain it better, not easy at all and will never pretend my solution is the holy grail. ;-) But, if I understand what your write then you now have:

  • Home Page (no collections) but 4 images with link to an index page
  • --- index pages: collection with a filter of your collection in place? (/example)
  • --- --- detailspage collection (/example/:slug)

So, I had a similar situation. I made one index page, and then I copied it as much as needed. So I copied my index page multiple times and that is what Toufiqur said is wrong. The button I added to my collection was linked to to my :slug. So I had multiple index pages, all going to the same detailspage (:slug).

What did I change: instead of copying an index page or making an index page (you can only make one per collection but can duplicate it which now seems to be an PageBuilder bug) I made a new Page in SpPagebuilder. I opened a faulty/old index page in another tab, and then used the copy function to copy my add-ons (text-images) to my new page. I made a new row and copied my collection to my new page. Then I linked my button for the detailspage to the :slug page that was still there. (after testing I removed the old 'index' page).

  • Home Page (no collections) but 4 images with link to an index page (links coming from menu)
  • --- Normal SP page with a filter of your collection in place
  • --- --- detailspage collection (/example/:slug)

Then, very important: renew your menu links to the new page you made. And change the aliases in the menu to something totally different to be sure there are no double aliasses interfering.

Now, check your URL's. I think that should do the trick. Good luck and out of curiosity keep me posted!

0
J
Jeanette
Accepted Answer
1 month ago #220529

Hi again Patin,

What do you know, - it works! :) Finally it became correct with the url's and presentation of the pages. Thank you so very much for your help and perfect explanation!

I did what you explained, deleted the 4 indexpages and created a standard page for each instead. Also copied the design from indexpages into the standard pages. Linked the menuitems to the new pages and that was about it. The slug page stayed the same.

But, there is one thing i miss and that is the top heading and i am not sure how to get this on the standard pages. I have entered the text in the menu but it dont show. Any idea? Her is the top i want to get back (which was visible when using dynamic index pages)

0
J
Jeanette
Accepted Answer
1 month ago #220532

Ah, never mind - it was just me beeing stupid forgetting to enable page title :)

0
Toufiq
Toufiq
Accepted Answer
Senior Staff 1 month ago #220690

Everything is fine now? Please let me know. Or Provide an screencast video.

0
J
Jeanette
Accepted Answer
1 month ago #220748

Yes thank you, everything is fine :)

0
Toufiq
Toufiq
Accepted Answer
Senior Staff 1 month ago #220773

Glad to know that your problem is solved. Cheers :)

0