Article shortcode to branch-bundled page #1931
-
Hello, Please forgive me as I am a bit new to all of this so I am unsure if my diagram is of appropriate quality. I have the following folder structure content I am trying to create a timeline where one of the pages I am trying to link to is a branch page (eg. project 2). So the article shortcode works for leaf page (project 1). But when I try to link to a branch page ( project 2 page with _index.md and a feature.png, and sub folders), a thumbnail and link are not generated. I can get a link to the page from the a menu link, where the branch and leaf pages are displayed as part of the list and show their feature.png thumbnails as cards. But when I try to use the article shortcode to reference a branch page, the shortcode does not produce a link in the branch page. Is there another way to manually add a list of pages that render cards to my home page? I realize it is a bit redundant and maybe I am missing a bigger picture....is there more info that is needed or is my description sufficent? thanks for your time. Thurston |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
oh I found an answer after a bit of digging and testing. I am not quite sure how to request a change formally so if you don't mind I'll put it here and if someone can respond with helping me figure out a better way to suggest an answer that would be really good. anyway the solution to this is the article shortcode in blowfish under: the section that iterates over articles and checks if the reference is linking to it's self is: Well .Site.RegularPages only returns leaf pages I believe. if that is changed to {{ $RelPermalink := .Get "link" }} I think it still checks the link to make sure it's not self linking and also checks to make sure that the RelPermalink matches the link given to the shortcode. This allows a wider range of pages to be linked using the partial article-link.html short code to make a rendered thumbnail and things. based on the article.html shortcode I added a shortcode article-allpage.html using the following code: {{ $parent := .Page.RelPermalink }}
|
Beta Was this translation helpful? Give feedback.
oh I found an answer after a bit of digging and testing. I am not quite sure how to request a change formally so if you don't mind I'll put it here and if someone can respond with helping me figure out a better way to suggest an answer that would be really good.
anyway the solution to this is the article shortcode in blowfish under:
layouts\shortcodes\article.html
the section that iterates over articles and checks if the reference is linking to it's self is:
{{ $RelPermalink := .Get "link" }}
{{ range ( where .Site.RegularPages "RelPermalink" $RelPermalink | first 1 ) }}
Well .Site.RegularPages only returns leaf pages I believe. if that is changed to
{{ $RelPermalink := .Get "link" }}
{{ …