ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Use categories or ???

May 16, 2012 3:12am

Subscribe [3]
  • #1 / May 16, 2012 3:12am

    Brian_az

    36 posts

    Hello,

    I am building a rental property site. I have a channel for buildings and a channel for suites. The user can browse by building or by suite, and it they go to a building page the suites for that building are listed. I use relationships to assign suites to the building.

    The front end is fine, but the admin is an issue. When we chose edit, since I used relationships the building the suite is for is not listed, so the list under edit could be:

    suite 100
    suite102
    suite100 (different building)
    suite 100 (yet another dif building)
    etc

    The issue is in the admin I can’t list/sort by building the suite is assigned to.
    My cheezy fix is to make a manually make a category for every building, so the edit page you can sort by category by building.

    My questions are:
    - is this truly the only way to do it?

    - is there a way to auto populate a category with {title} from building, so when we try to assign categories to a suite, one of the category options would be a list of all buildings (auto popultaed by the buildings channel {title} tag?


    Thank you!!

  • #2 / May 16, 2012 10:43am

    Boyink!

    5011 posts

    Did you look at using Matrix, and having a “Suites” field in the building channel - such that one entry in the buildings channel would list all the suites?

    May or may not work depending on how much content you have for a Suite.

  • #3 / May 16, 2012 2:57pm

    Brian_az

    36 posts

    Matrix is a close fit, but the suites can have various info, ie some have 1 pic some have 5, and I need to be able to list suites only. Stock EE is working great, its just the limited listing features in the EE admin that is really an issue.

    It would be ideal to populate a category with channel entries, ie each building entry {title) be a category option.

    If Matrix will allow various amount of images per suite, and let me display a page of all suites and filter them (like a EE categories page) then I wil certainly give it a try.

    Think Matrix can do it, or any ideas on populating a category?

  • #4 / May 16, 2012 3:06pm

    Boyink!

    5011 posts

    Different idea.

    Create a snippet called “edit_this”.  Put in the following code:

    {if logged_in}
     <a href="http://{cp_url}?S=0&D=cp&C=content_publish&M=entry_form&channel_id={channel_id}&entry_id={entry_id}" target="_blank" rel="noopener">Edit This</a>
    {/if}

    Then inside any channel:entries loop or reverse related entries loop use the snippet variable: {edit_this}.

    What this does is create a front-end link for logged-in users that opens the EE Control Panel, with the selected entry in edit mode.

    This will let your users find the desired content on the front end of the site, and can almost negate the need for the edit tab in the CP.

  • #5 / May 16, 2012 3:14pm

    Brian_az

    36 posts

    Great point, thx. I actually used that same feature on a different project last week, but never considered it for this. I’ll give it a try.

  • #6 / May 17, 2012 10:54am

    Shane Eckert

    7174 posts

    Hey Brian_az,

    How are things going? Did Mike’s suggestion work for you?

    Cheers,

  • #7 / May 30, 2012 8:22pm

    Brian_az

    36 posts

    It did work, though I ended up using if author_id == logged_in_member_id rather then if logged-in.  Does this matter?

    {if author_id == logged_in_member_id} <a href="http://{cp_url}?S=0&D=cp&C=content_publish&M=entry_form&channel_id={channel_id}&entry_id={entry_id}" target="blank" rel="noopener">edit</a>{/if}

     

    Also, for others who may see this, somehow a semi colo got inserted channel;_id and entry;_id —you have to make sure there are no ; for it to work.

    thanks!

  • #8 / May 31, 2012 4:31pm

    Shane Eckert

    7174 posts

    Hey Brian_az,

    Glad to hear it!

    If you need anything else, please just let me know by opening a new thread.

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases