Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build breadcrumb for recent, popular, users... #2597

Closed
rdelcampog opened this issue Jan 11, 2015 · 2 comments
Closed

Build breadcrumb for recent, popular, users... #2597

rdelcampog opened this issue Jan 11, 2015 · 2 comments
Assignees
Milestone

Comments

@rdelcampog
Copy link

Please, provide the breadcrumb object in every custom page API response (/api/recent, /api/popular...) for template consistency and to avoid duplicate code like:

    <ol class="breadcrumb">
        <img class="breadcrumb-home" src="https://exo.do/images/exodo/misc/navbit-home.png" title="Inicio" alt="Inicio">
        <!-- BEGIN breadcrumbs -->
        <li itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb">
            <!-- IF !@last --><a href="{breadcrumbs.url}" itemprop="url"><!-- ENDIF !@last -->
            <span itemprop="title">
                {breadcrumbs.text}
                <!-- IF @last -->
                    <!-- IF !feeds:disableRSS -->
                    <a target="_blank" href="{relative_path}/topic/{tid}.rss"><i class="fa fa-rss-square"></i></a>
                    <!-- ENDIF !feeds:disableRSS -->
                <!-- ENDIF @last -->
            </span>
            <!-- IF !@last --></a><!-- ENDIF !@last -->
        </li>
        <!-- END breadcrumbs -->

        <!-- IF template.recent -->
        <li itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb">
            <a href="{relative_path}/" itemprop="url"><span itemprop="title">[[global:home]]</span></a>
        </li>
        <li itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb">
            <span itemprop="title">
                [[recent:title]]
                <!-- IF !feeds:disableRSS -->
                <a target="_blank" href="{relative_path}/recent.rss"><i class="fa fa-rss-square"></i></a>
                <!-- ENDIF !feeds:disableRSS -->
            </span>
        </li>
        <!-- ENDIF template.recent -->
    </ol>

Thank you!
(ping @psychobunny )

@julianlam
Copy link
Member

This would be a good idea, if only to bring consistency to all routes 👍

@rdelcampog
Copy link
Author

We're developing a theme and cause of this we need to add 4-5 if/else conditions in the template and like 30 extra lines of code.

Thank you! 😄

@barisusakli barisusakli added this to the 0.6.1 milestone Jan 29, 2015
@barisusakli barisusakli self-assigned this Jan 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants