+ Reply to Thread
Results 1 to 5 of 5

Thread: Can I load listing-details page directly only knowing ID number?

  1. #1
    Senior Member
    Join Date
    Dec 2023
    Posts
    161

    Can I load listing-details page directly only knowing ID number?

    For example, the print page can be accessed via
    /print.html?item=listing&id=815

    Is there a way to similarly load a listing details page directly if I have only the listing id #?

    (/listing-details.html?item=listing&id=815 doesn't work but I'm not sure if that syntax is correct)

  2. #2
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,174
    You can't do it directly because each system page has its controller (php and tpl file). For the listing details page it's listing_details

    You can try to use content from listing_details.php and listing_details.tpl and adapt it to your case

  3. #3
    Senior Member
    Join Date
    Dec 2023
    Posts
    161
    The rewrite is complicated for me, but it looks like the default rewrite of a listing details url is to index.php as follows:
    /index.php?page=CategoryLevel1&rlVareables=rest-of-path-including-SubcategoryLevel1&listing_id=815

    It will actually redirect to the correct page if you enter:
    /index.php?page=any-active-category&rlVareables=&listing_id=815

    But it won't work if page= is blank, and it's too messy to point it to a wrong category so I wouldn't want to do that.

    This might be too complicated for me to work out to start, so I think I'll add this to my list of customization requests that I'll get you to help me with
    I have one customization request pending regarding the xls import plugin customization, so after that one I'll put in a request regarding this one
    Many thanks!
    Last edited by Horizon; January 20, 2024 at 05:19 PM.

  4. #4
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,174
    As an alternative, you can use Reference Number plugin that supports short listing url with only reference number like .../RF546193/

    For that:

    - you need to install the plugin

    - go to your listing type settings > Listing type URL; Ref number in listing URLs > Yes

  5. #5
    Senior Member
    Join Date
    Dec 2023
    Posts
    161
    I thought about using the reference number plugin for this, setting reference number = listing ID number.

    However in my first test, I ran into an issue, where if I enable ref number in listing urls, listing titles get messed up where I'm building listing title = category + subcategory + length.

    https://forum.flynax.com/showthread....n-listing-URLs

    I think I will ask you to do a customization for me so I can use both normal URLs (/category/subcategory/listingtitle.html) AND use some of the code from "ref number in listing URL" as an "add-on" so I could use both (allowing "url with ref numbers in URL" logic to redirect to normal URLs for me when I only have the listing ID# as the incoming URL for pre-existing URLs that I want to maintain and direct to the correct page in the new Flynax site.)
    Last edited by Horizon; January 21, 2024 at 08:20 PM.

+ Reply to Thread