hus_hmd Registered Developer

  • Male
  • from Dubai
  • Member since Jan 27th 2019
  • Last Activity:
Posts
30
Likes Received
10
Points
170
Profile Hits
41
  • hus_hmd

    Like (Post)
    I launched this site for Rioz Global last week.

    It's standard Perch with Forms add-on and Chirp SEO add-on.
  • hus_hmd

    Replied to the thread My Sample Add-On.
    Post
    (Quote from bj.lewis221)

    You can specify the namespace you want to use in your class:

    (Code, 6 lines)



    (Quote from bj.lewis221)

    Correct. You can't filter by dynamic fields unless you have an index table.
  • hus_hmd

    Like (Post)
    that <perch:showall> is NICE! Thank you! so the template was using <perch:sample> and that worked with it as is, but with your $filtered_things code the namespace was <perch:content> and now it works! Will this cause any issues down the road?

    Also…
  • hus_hmd

    Replied to the thread My Sample Add-On.
    Post
    When you say empty, do you mean the template doesn't output any content (just the HTML markup)?

    If so, to check what you have access to inside the template you can use <perch:showall>. Alternatively, you can use the skip-template option and inspect the…
  • hus_hmd

    Post
    Have you created the multiple-item region Location on /location/index.php? Is the region key Location or is it missing s at the end?

    Enabling debug mode should be helpful here.
  • hus_hmd

    Post
    (Quote from granttransition)


    The closest thing to a collection in regular Perch is a multiple-item region. You can display the region on any page using the page option:

    (Code, 4 lines)


    Collections are more powerful, but you get a lot of the same…
  • hus_hmd

    Replied to the thread Categories Side Menu - sub items.
    Post
    That's the default category for the sub-levels (it's inside a function called get_sub_categories()). Apologies if my comment caused some confusion.

    The first level is output by the initial perch_categories() call:

    (Code, 12 lines)

  • hus_hmd

    Like (Post)
    Hey,

    I think the current search results within Runway are super hard to actually search, and unstructured. My clients find:

    - It difficult to understand what result the listing is related to
    - The title of each type of search, e.g. 'Collection' being…
  • hus_hmd

    Replied to the thread My Sample Add-On.
    Post
    get_filtered_listing() should render the template for you. So you don't need to render it inside my_sample_listing().

    Take it one step at a time and iterate on your changes. You've added get_filtered_listing() and you can see the database query it's…
  • hus_hmd

    Replied to the thread My Sample Add-On.
    Post
    If you enable debug mode, what does the debug message say?

    You can add marks to the debug message so it's easier to spot the relevant lines:

    (Code, 4 lines)


    You can refer to first-party apps like the Blog app to see how they handle the filtered…
  • hus_hmd

    Replied to the thread My Sample Add-On.
    Post
    You can either write your own database queries (check the database API reference) or you can use PerchFactory's get_filtered_listing().

    A simplified version of what your code could be:

    (Code, 2 lines)

  • hus_hmd

    Replied to the thread My Sample Add-On.
    Post
    You're always fetching all $Things:

    (Code, 1 line)


    So your filter options aren't being used when fetching $Things.
  • hus_hmd

    Replied to the thread Empty textarea versus empty text.
    Post
    Hi Stephen Meehan

    It shouldn't really matter. Your code should ideally handle both cases whether it's null or an empty string.
  • hus_hmd

    Replied to the thread My Sample Add-On.
    Post
    What does the function my_sample_listing() look like?
  • Hello granttransition

    Your tag is missing s for the exists attribute.
  • hus_hmd

    Replied to the thread isset fallback not working?.
    Post
    You can change the if statement to:

    (Code, 3 lines)

  • hus_hmd

    Replied to the thread Editable slug field validation.
    Post
    Yes, this would be good enough for me.
  • hus_hmd

    Like (Post)
    That makes sense. Theoretically it should be possible for us to run it through the slugify() functional and come out with the same result.
  • hus_hmd

    Replied to the thread isset fallback not working?.
    Post
    Hello Stephen Meehan

    I would use perch_content_custom() to output all the project meta tags:

    (Code, 8 lines)


    And you can rely on conditional tags inside the template for the check you're currently performing in PHP.

    ---

    Back to your code. PHP's
  • I'm looking to use Vue with the Forms add-on, however, when adding the v-model directive to a perch form input, it gets stripped out.

    I know it's possible to pass through class names and data attributes but was wondering if you'd consider extending…