Forum

Thread tagged as: Question, Addons, Blog

Slug ID for a particular section

Hi! Is it possible to get the slug ID, but taking into account the section it belongs to? For instance, i have a section news and a section article (using the blog app). When i try to get the slug ID from what i now that is my second news posts, I get "8". Is there any way to get the slug id, but for that section in particular?

Gustavo Bica

Gustavo Bica 0 points

  • 5 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

Please post your Diagnostics Report and your code so far.

Rachel Andrew said:

Please post your Diagnostics Report and your code so far.

I'm sorry, but i dont see how that is relevant, the number 8 is correct, it is indeed my 8º posts, the "problem" is that in my particular case, I would like to have the slug ID for that specific section.

For example:

 <div class="modal fade" id="project-x" tabindex="-1" role="dialog" aria-labelledby="project-x-label" aria-hidden="true"> 

The places where you read "project-x" I want to have the number of post, instead of the x . Using the code below I get 2 (which is correct, my perch_blog_custom returns two posts) and 8 (which is also correct, I do have 8 posts in total, by that i mean,putting together the posts i have in my section article and in my section news I do have in total 8 posts)

<perch:blog id="perch_item_count" />
<perch:blog id="postID"/>

So the result i would like to achieve is:

 <div class="modal fade" id="project-1" tabindex="-1" role="dialog" aria-labelledby="project-1-label" aria-hidden="true"> 
 <div class="modal fade" id="project-2" tabindex="-1" role="dialog" aria-labelledby="project-2-label" aria-hidden="true"> 

I dont know if I explained myself properly. :S

But anyway here is the diagnostics Report

Diagnostics report HEALTH CHECK

Perch is out of date. You are running Perch Runway 2.8.29 and the latest is 2.8.30. Update instructions PHP 5.4.43 version is okay, but a little out of date. Consider updating soon. MySQL 5.5.42-37.1-log is up to date Image processing available SUMMARY INFORMATION

Perch Runway: 2.8.29, PHP: 5.4.43, MySQL: 5.5.42-37.1, with PDO Server OS: Linux, cgi-fcgi Installed apps: content (2.8.29), assets (2.8.29), categories (2.8.29), perch_blog (5.0) App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog' ); PERCH_LOGINPATH: /perch PERCH_PATH: /home2/qualida1/public_html/gustavobica/perch PERCH_CORE: /home2/qualida1/public_html/gustavobica/perch/core PERCH_RESFILEPATH: /home2/qualida1/public_html/gustavobica/perch/resources Image manipulation: GD Imagick PHP limits: Max upload 64M, Max POST 64M, Memory: 256M, Total max file upload: 64M F1: 2edba60ed1f613d6dd804feb202456a2 Resource folder writeable: Yes DOCUMENT_ROOT: /home2/qualida1/public_html/gustavobica HTTP_HOST: gustavobica.com REQUEST_URI: /perch/core/settings/diagnostics/ SCRIPT_NAME: /perch/core/settings/diagnostics/index.php

What i was looking for was

<perch:blog id="perch_item_index" />

thanks anyway