Skip to content

Fix additional links being shown with an empty - #35

Open
sttz wants to merge 2 commits into
ramiismail:masterfrom
sttz:master
Open

Fix additional links being shown with an empty#35
sttz wants to merge 2 commits into
ramiismail:masterfrom
sttz:master

Conversation

@sttz

@sttz sttz commented May 10, 2015

Copy link
Copy Markdown

In project pages, additional links that don't contain a subpath (e.g. domain.com instead of domain.com/path) are shown with an empty title, i.e. not appearing at all in the rendered page.

The behavior of the code for additional links is also not in sync between the index page and project pages. The index pages compares the strpos result to !== false (does not contain) whereas the project page compares it to !== 0 (does not begin with), which causes the issue.

This pull requests fixes the issue and brings the behavior on the main page and project pages in line, always checking if the link contains a /.

I'm not sure if the behavior of this title-parsing is very useful anyway. I think it would be clearer to always show the link as it was entered and provide an optional title field in the xml to set the title manually.

sttz added 2 commits May 10, 2015 15:20
contain a subpath (e.g. domain.com instead of domain.com/path)
on project pages.

This brings the behaviour of additional links in project pages in
line with the index page, which already uses "!== false" instead
of "!== 0".
parse out the domain, use the full result of parseLink as title by
default and provide the option override the title in the xml using
the linktitle field.
@sttz

sttz commented May 10, 2015

Copy link
Copy Markdown
Author

I went ahead and implemented my suggestion as well. Now the link title is the output of parseLinkby default and can be set manually in the xml using a linktitle field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant