Search code examples
expressionenginecategories

Access Categories for each entry of a specific channel in ExpressionEngine


So, I am still trying to figure out how to use expression engine and I want to create a list of all of the entries in a channel, which includes the corresponding categories. I can create the list as follows:

{exp:channel:entries channel="custom_channel"}
   <div style = "display:block;padding:10px;border-bottom:1px solid #999999;">
      <span>Title: {title}</span><br>
      <span>Date published: {entry_date format="%m/%d/%y"}</span><br>
      <span>Access: {access}</span><br>
      <span>Type: {type}</span><br>
      {!--Here is where I am trying to access the corresponding 
          categories for each of the entries--}
   </div>
   {paginate}
          <p>Page {current_page} of {total_pages} pages {pagination_links}</p>
   {/paginate}
{/exp:channel:entries}

So, what this does currently is it goes through the entries and creates the html as defined for each entry. I've tried to include {categories} and other related tags but have not been successful. I have looked online and have not been able to find anything related. Is it possible to access the corresponding categories for each entry? If so, how? Any help is appreciated. Thanks.


Solution

  • Yes, you can use the categories variable pair. Incidentally, if you're looking to tap into the ExpressionEngine community, post your questions to expressionengine.stackexchange.com